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 if [[ ! $install_path ]]; then
install_path=$HOME/.local/bin install_path=$HOME/.local/bin
else
install_path=${install_path[2]}
fi fi
for prog in $@; do for prog in $@; do
@ -44,6 +46,8 @@ for prog in $@; do
if [[ -e $install_path/${prog:t} && ! $force ]]; then if [[ -e $install_path/${prog:t} && ! $force ]]; then
warning "$prog already exists at $install_path. Skipping." warning "$prog already exists at $install_path. Skipping."
else else
ln -fsr $prog $install_path check "Installing $prog"
ln -fsr $prog $install_path || fail
succeed
fi fi
done done

View file

@ -37,7 +37,7 @@ fi
EDITFILE=$(mktemp -p ${TMPDIR:-/tmp} xbps-worldfile.edit.XXXXXXXXXX) EDITFILE=$(mktemp -p ${TMPDIR:-/tmp} xbps-worldfile.edit.XXXXXXXXXX)
cp $TMPFILE $EDITFILE cp $TMPFILE $EDITFILE
$EDITOR $EDITFILE ${EDITOR:-/usr/bin/vim} $EDITFILE
autopkgs=$(not-in-left $EDITFILE $TMPFILE | first-col) autopkgs=$(not-in-left $EDITFILE $TMPFILE | first-col)
manualpkgs=$(not-in-left $TMPFILE $EDITFILE | first-col) manualpkgs=$(not-in-left $TMPFILE $EDITFILE | first-col)