mirror of
https://github.com/zuno/slackpkgplus
synced 2025-01-15 03:40:49 +01:00
Fix non working properly 'reinstall' command.
This commit is contained in:
parent
7cdad2d751
commit
18ec21c844
1 changed files with 5 additions and 1 deletions
|
@ -734,6 +734,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
unset FULLNAME
|
unset FULLNAME
|
||||||
unset PKGDATA
|
unset PKGDATA
|
||||||
unset LINEIDX
|
unset LINEIDX
|
||||||
|
unset PKGINFOS
|
||||||
|
|
||||||
AUTOP=no
|
AUTOP=no
|
||||||
if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]];then
|
if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]];then
|
||||||
|
@ -746,6 +747,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
AUTOP=$TAG_PRIORITY
|
AUTOP=$TAG_PRIORITY
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [[ "$CMD" == "reinstall" ]];then
|
||||||
|
PKGINFOS=$( grep " $ARGUMENT " $TMPDIR/tmplist|awk '{print " "$6" "}'|grep -f - -n -m 1 ${TMPDIR}/pkglist)
|
||||||
|
fi
|
||||||
if [ "$AUTOP" == "on" ] ; then
|
if [ "$AUTOP" == "on" ] ; then
|
||||||
PKGINFOS=$(
|
PKGINFOS=$(
|
||||||
cd $ROOT/var/log/packages
|
cd $ROOT/var/log/packages
|
||||||
|
@ -756,6 +760,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
echo "$X"|sed -r -e 's/ [0-9]+([^0-9].*)*$/ [^ ]\\+ [^ ]\\+ [0-9]\\+\1_slack[0-9]/' -e 's/^/ /'
|
echo "$X"|sed -r -e 's/ [0-9]+([^0-9].*)*$/ [^ ]\\+ [^ ]\\+ [0-9]\\+\1_slack[0-9]/' -e 's/^/ /'
|
||||||
)| grep -f - -n -m 1 ${TMPDIR}/pkglist
|
)| grep -f - -n -m 1 ${TMPDIR}/pkglist
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
if [ ! -z "$PKGINFOS" ] ; then
|
if [ ! -z "$PKGINFOS" ] ; then
|
||||||
LINEIDX=${PKGINFOS/:*/} #LINEIDX=$(echo "$PKGINFOS" | cut -f1 -d":")
|
LINEIDX=${PKGINFOS/:*/} #LINEIDX=$(echo "$PKGINFOS" | cut -f1 -d":")
|
||||||
PKGDATA=( ${PKGINFOS/*:/} ) #PKGDATA=( $(echo "$PKGINFOS" | cut -f2- -d":") )
|
PKGDATA=( ${PKGINFOS/*:/} ) #PKGDATA=( $(echo "$PKGINFOS" | cut -f2- -d":") )
|
||||||
|
@ -767,7 +772,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
FULLNAME=$(echo "${PKGDATA[5]}.${PKGDATA[7]}")
|
FULLNAME=$(echo "${PKGDATA[5]}.${PKGDATA[7]}")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
for CPRIORITY in ${PRIORITY[@]} ; do
|
for CPRIORITY in ${PRIORITY[@]} ; do
|
||||||
[ "$PKGDATA" ] && break
|
[ "$PKGDATA" ] && break
|
||||||
|
|
Loading…
Reference in a new issue