mirror of
https://github.com/zuno/slackpkgplus
synced 2025-01-13 20:01:04 +01:00
Allow to use SBo from stable AND from current
set SBOURL=https://www.slackbuilds.org/slackbuilds/14.2/ SBOCUR=http://cgit.ponce.cc/slackbuilds/ in configuration
This commit is contained in:
parent
b69f5e27ef
commit
7cbdeb1842
1 changed files with 13 additions and 13 deletions
|
@ -452,7 +452,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
GPG-KEY) TOCACHE=0 ; CURREPO=${1/*gpgkey-tmp-/};;
|
GPG-KEY) TOCACHE=0 ; CURREPO=${1/*gpgkey-tmp-/};;
|
||||||
FILELIST.TXT) TOCACHE=1 ;;
|
FILELIST.TXT) TOCACHE=1 ;;
|
||||||
SLACKBUILDS.TXT.gz) TOCACHE=1 ; CURREPO=SBo ;;
|
SLACKBUILDS.TXT.gz) TOCACHE=1 ; CURREPO=SBo ;;
|
||||||
slackbuilds-current-*.tar.gz) TOCACHE=0 ; CURREPO=SBo ;;
|
slackbuilds-current-*.tar.gz) TOCACHE=0 ; CURREPO=SBo-cur ;;
|
||||||
esac
|
esac
|
||||||
if [ -z "$CURREPO" ]; then
|
if [ -z "$CURREPO" ]; then
|
||||||
CURREPO=slackware
|
CURREPO=slackware
|
||||||
|
@ -598,7 +598,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(basename $1) = "FILELIST.TXT" ];then
|
if [ $(basename $1) = "FILELIST.TXT" ];then
|
||||||
if echo "$SBOURL"|grep -q SLACKBUILDS.TXT.gz ;then
|
if [ ! -z "$SBOURL" ];then
|
||||||
SBOURL=${SBOURL%/}/
|
SBOURL=${SBOURL%/}/
|
||||||
$DOWNLOADER $TMPDIR/SLACKBUILDS.TXT.gz ${SBOURL}SLACKBUILDS.TXT.gz
|
$DOWNLOADER $TMPDIR/SLACKBUILDS.TXT.gz ${SBOURL}SLACKBUILDS.TXT.gz
|
||||||
zcat $TMPDIR/SLACKBUILDS.TXT.gz |awk '{
|
zcat $TMPDIR/SLACKBUILDS.TXT.gz |awk '{
|
||||||
|
@ -608,12 +608,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
if($1=="") print name,version,location
|
if($1=="") print name,version,location
|
||||||
}' > $WORKDIR/sbolist
|
}' > $WORKDIR/sbolist
|
||||||
fi
|
fi
|
||||||
if echo "$SBOURL"|grep -q ponce;then
|
if [ ! -z "$SBOCUR" ];then
|
||||||
SBOURL=${SBOURL%/}/
|
SBOCUR=${SBOCUR%/}/
|
||||||
SBOtag=$(basename $(curl -s $SBOURL|grep "/slackbuilds/tag/?h=" |head -1|grep -oE "href='[^']+'"|cut -f2 -d"'"|grep tar.gz))
|
SBOtag=$(basename $(curl -s $SBOCUR|grep "/slackbuilds/tag/?h=" |head -1|grep -oE "href='[^']+'"|cut -f2 -d"'"|grep tar.gz))
|
||||||
SBOlast=$(cat $WORKDIR/sbolist.tag 2>/dev/null)
|
SBOlast=$(cat $WORKDIR/sbolistcur.tag 2>/dev/null)
|
||||||
if echo $SBOtag|grep -q slackbuilds-current-.*tar.gz && [ "$SBOtag" != "$SBOlast" ];then
|
if echo $SBOtag|grep -q slackbuilds-current-.*tar.gz && [ "$SBOtag" != "$SBOlast" ];then
|
||||||
$DOWNLOADER $TMPDIR/$SBOtag ${SBOURL}snapshot/$SBOtag
|
$DOWNLOADER $TMPDIR/$SBOtag ${SBOCUR}snapshot/$SBOtag
|
||||||
(
|
(
|
||||||
cd $TMPDIR
|
cd $TMPDIR
|
||||||
tar xf $TMPDIR/*$SBOtag
|
tar xf $TMPDIR/*$SBOtag
|
||||||
|
@ -621,8 +621,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
find . -name \*.info|while read SBOinfo;do
|
find . -name \*.info|while read SBOinfo;do
|
||||||
source $SBOinfo
|
source $SBOinfo
|
||||||
echo $PRGNAM $VERSION $(dirname $SBOinfo)
|
echo $PRGNAM $VERSION $(dirname $SBOinfo)
|
||||||
done > $WORKDIR/sbolist
|
done > $WORKDIR/sbolistcur
|
||||||
echo $SBOtag > $WORKDIR/sbolist.tag
|
echo $SBOtag > $WORKDIR/sbolistcur.tag
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -2270,7 +2270,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
searchlistEX "$LIST"
|
searchlistEX "$LIST"
|
||||||
echo -e "\nYou can search specific files using \"slackpkg file-search file\".\n"
|
echo -e "\nYou can search specific files using \"slackpkg file-search file\".\n"
|
||||||
fi
|
fi
|
||||||
if echo "$SBOURL"|grep -q SLACKBUILDS.TXT.gz ;then
|
if [ ! -z "$SBOURL" ];then
|
||||||
SBORESULT="$(grep -E -i "^[^ ]*$PATTERN" $WORKDIR/sbolist 2>/dev/null|sed -e 's/ /-/' -e "s#\./#$SBOURL#" -e 's/$/.tar.gz/')"
|
SBORESULT="$(grep -E -i "^[^ ]*$PATTERN" $WORKDIR/sbolist 2>/dev/null|sed -e 's/ /-/' -e "s#\./#$SBOURL#" -e 's/$/.tar.gz/')"
|
||||||
if [ ! -z "$SBORESULT" ];then
|
if [ ! -z "$SBORESULT" ];then
|
||||||
echo
|
echo
|
||||||
|
@ -2280,11 +2280,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if echo "$SBOURL"|grep -q ponce;then
|
if [ ! -z "$SBOCUR" ];then
|
||||||
SBORESULT="$(grep -E -i "^[^ ]*$PATTERN" $WORKDIR/sbolist 2>/dev/null|sed -e 's/ /-/' -e "s#\./#${SBOURL}plain/#" -e 's#$#/#')"
|
SBORESULT="$(grep -E -i "^[^ ]*$PATTERN" $WORKDIR/sbolistcur 2>/dev/null|sed -e 's/ /-/' -e "s#\./#${SBOCUR}plain/#" -e 's#$#/#')"
|
||||||
if [ ! -z "$SBORESULT" ];then
|
if [ ! -z "$SBORESULT" ];then
|
||||||
echo
|
echo
|
||||||
echo "Also found in SBo (download it with 'wget -r -np'):"
|
echo "Also found in SBo-current (download it with 'wget -r -np'):"
|
||||||
echo
|
echo
|
||||||
echo -e "[package] [url]\n$SBORESULT"|column -t|sed -e 's/ / /' -e 's/^/ /' -e 's/ \[/[ /g' -e 's/\]/ ]/g'|grep --color -E -i -e "$PATTERN" -e ^
|
echo -e "[package] [url]\n$SBORESULT"|column -t|sed -e 's/ / /' -e 's/^/ /' -e 's/ \[/[ /g' -e 's/\]/ ]/g'|grep --color -E -i -e "$PATTERN" -e ^
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in a new issue