fix minor errors in install and worldfile script

This commit is contained in:
root 2020-11-24 21:54:06 +00:00
parent 84c77021e4
commit 1809ffacb3
2 changed files with 6 additions and 2 deletions

View file

@ -33,6 +33,8 @@ zparseopts -D -E p:=install_path -path:=install_path f=force -force=force
if [[ ! $install_path ]]; then
install_path=$HOME/.local/bin
else
install_path=${install_path[2]}
fi
for prog in $@; do
@ -44,6 +46,8 @@ for prog in $@; do
if [[ -e $install_path/${prog:t} && ! $force ]]; then
warning "$prog already exists at $install_path. Skipping."
else
ln -fsr $prog $install_path
check "Installing $prog"
ln -fsr $prog $install_path || fail
succeed
fi
done