Fixed Download only

This commit is contained in:
Matteo Rossini 2016-01-05 23:57:01 +01:00
parent 6f459f145b
commit d3bd352f01

View file

@ -230,6 +230,17 @@ if [ "$SLACKPKGPLUS" = "on" ];then
handle_event "remove" handle_event "remove"
} # END function remove_pkg() } # END function remove_pkg()
if [ "$DOWNLOADONLY" == "on" ];then
function installpkg() {
echo " Download only.. `basename $1` not installed!"
DELALL=off
}
function upgradepkg() {
echo " Download only.. `basename $1` not upgraded!"
DELALL=off
}
fi
# Overrides original upgrade_pkg(). Required by the notification mechanism. # Overrides original upgrade_pkg(). Required by the notification mechanism.
function upgrade_pkg() { function upgrade_pkg() {
local i local i
@ -242,10 +253,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
done done
DELALL="$OLDDEL" DELALL="$OLDDEL"
fi fi
if [ "$DOWNLOADONLY" == "on" ];then
echo "Download only.. not upgraded!"
return
fi
ls -1 $ROOT/var/log/packages > $TMPDIR/tmplist ls -1 $ROOT/var/log/packages > $TMPDIR/tmplist
for i in $SHOWLIST; do for i in $SHOWLIST; do
@ -272,10 +279,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
done done
DELALL="$OLDDEL" DELALL="$OLDDEL"
fi fi
if [ "$DOWNLOADONLY" == "on" ];then
echo "Download only.. not installed!"
return
fi
for i in $SHOWLIST; do for i in $SHOWLIST; do
INSTALL_T='installed: ' INSTALL_T='installed: '
if [ -e $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') ];then if [ -e $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') ];then
@ -630,7 +633,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
if [ "$STRICTGPG" != "off" ];then if [ "$STRICTGPG" != "off" ];then
if [ ! -z "$REPO" ] && [ -e "${WORKDIR}/gpg/GPG-KEY-${REPO}.gpg" ] ; then if [ ! -z "$REPO" ] && [ -e "${WORKDIR}/gpg/GPG-KEY-${REPO}.gpg" ] ; then
echo "Using GPG-KEY-${REPO}.gpg" >&2
gpg --no-default-keyring \ gpg --no-default-keyring \
--keyring ${WORKDIR}/gpg/GPG-KEY-${REPO}.gpg \ --keyring ${WORKDIR}/gpg/GPG-KEY-${REPO}.gpg \
--verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0" --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
@ -1093,6 +1095,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
cleanup cleanup
;; ;;
esac esac
echo
echo
SHOWLIST=$(cat $TMPDIR/dialog.out | tr -d \") SHOWLIST=$(cat $TMPDIR/dialog.out | tr -d \")
if [ -z "$SHOWLIST" ]; then if [ -z "$SHOWLIST" ]; then
echo "No packages selected for $2, exiting." echo "No packages selected for $2, exiting."