fix minor errors in install and worldfile script
This commit is contained in:
parent
84c77021e4
commit
1809ffacb3
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue