Don't parse output of ls

This commit is contained in:
a1346054 2021-08-25 21:54:57 +00:00
parent 2322096927
commit abe52c831d

View file

@ -2,7 +2,7 @@
# Unlink the ffs alias if it links to ffsend # Unlink the ffs alias if it links to ffsend
if [[ -L /usr/bin/ffs ]] \ if [[ -L /usr/bin/ffs ]] \
&& [[ $(ls -l /usr/bin/ffs | sed -e 's/.* -> //') == "/usr/bin/ffsend" ]]; \ && [[ $(realpath /usr/bin/ffs) == "/usr/bin/ffsend" ]]; \
then then
echo "Removing ffs alias for ffsend..." echo "Removing ffs alias for ffsend..."
unlink /usr/bin/ffs unlink /usr/bin/ffs