diff --git a/etc/profile.d/z-aliases.sh b/etc/profile.d/z-aliases.sh index ffd9259..9c91d7b 100755 --- a/etc/profile.d/z-aliases.sh +++ b/etc/profile.d/z-aliases.sh @@ -17,13 +17,16 @@ if [[ "$OSTYPE" != darwin* ]]; then # long format with ISO dates alias lll='ls --color=auto -Al "--time-style=+%Y-%m-%d %H:%M:%S GMT%z"' - # color ip route - if ip -V | grep '^ip utility, iproute2-.*, libbpf' &>/dev/null; then - # EL 8+ - "ip utility, iproute2-6.2.0, libbpf 0.5.0" - alias ip='ip --color=auto' - else - # EL 7 - "ip utility, iproute2-ss170501" - alias ip='ip -c' + # if there is iproute installed + if command -v ip > /dev/null; then + # color ip route + if ip -V | grep '^ip utility, iproute2-.*, libbpf' &>/dev/null; then + # EL 8+ - "ip utility, iproute2-6.2.0, libbpf 0.5.0" + alias ip='ip --color=auto' + else + # EL 7 - "ip utility, iproute2-ss170501" + alias ip='ip -c' + fi fi else # MacOS aliases diff --git a/gwebu-profile.spec.in b/gwebu-profile.spec.in index 4611bad..2cd6673 100644 --- a/gwebu-profile.spec.in +++ b/gwebu-profile.spec.in @@ -1,6 +1,6 @@ Summary: Gwebu profile.d - cool date, prompt with history, aliases Name: gwebu-profile -Version: 1.0.4 +Version: 1.0.5 Release: 0 BuildArch: noarch License: GPLv2 @@ -41,6 +41,9 @@ install -m 0644 etc/profile.d/*.sh %{buildroot}%{_sysconfdir}/profile.d/ %changelog +* Wed Oct 16 2024 Doncho Gunchev - 1.0.5-0 +- fix: Don't alias ip if iproute is not installed. + * Mon Jul 15 2024 Doncho Gunchev - 1.0.4-0 - Fix python virtual environment support. This works on MacOS with python 3.9, 3.10, 3.11 and 3.12.