This commit is contained in:
emmett1
2018-07-27 15:37:10 +08:00
parent 94b822180b
commit f9395a9d66

16
scratch
View File

@@ -370,6 +370,8 @@ installpkg() {
elif [[ "$1" =~ ^-(r|-reinstall)$ ]]; then
OPTS+=($1)
REINSTALL=1
elif [[ "$1" =~ ^-(d|-no-dep)$ ]]; then
NO_DEP=1
elif [[ "$1" = "--no-confirm" ]]; then
NOCONFIRM=1
elif [[ "$1" =~ ^-. ]]; then
@@ -395,6 +397,20 @@ installpkg() {
done
return 0
fi
if [ "$NO_DEP" = 1 ]; then
for ii in ${PKGNAME[@]}; do
if [ -f $INDEX_DIR/$ii/.pkginfo ]; then
echo "Package '$ii' already installed."
elif [ ! $(getportpath $ii) ]; then
echo "Package '$ii' not found."
else
pushd $(getportpath $ii)
pkgbuild -i ${OPTS[@]}
popd
fi
done
return 0
fi
for i in ${PKGNAME[@]}; do
if [ -f $INDEX_DIR/$i/.pkginfo ]; then
echo "Package '$i' already installed."