diff --git a/ChangeLog.txt b/ChangeLog.txt index 8157180..1505e91 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +Current + - speed up the update process + - allow to disable the download status bar + Version 0.9.1 - 05/May/2013 - fixed an error when a folder is missing in the slackware mirror (as /testing). diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 8157180..1505e91 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,7 @@ +Current + - speed up the update process + - allow to disable the download status bar + Version 0.9.1 - 05/May/2013 - fixed an error when a folder is missing in the slackware mirror (as /testing). diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 4ed5cb3..7d17f53 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -40,18 +40,6 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi fi - if [ $(basename $1) = "CHECKSUMS.md5" ];then - for PREPO in $REPOPLUS;do - URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 - if echo $URLFILE | grep -q "^file://" ; then - URLFILE=${URLFILE:6} - cp -v $URLFILE $2-$PREPO - else - $DOWNLOADER $2-$PREPO $URLFILE - fi - done - fi - if [ $(basename $1) = "CHECKSUMS.md5.asc" ];then if [ "$CHECKGPG" = "on" ];then for PREPO in $REPOPLUS;do @@ -89,16 +77,15 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi if [ $(basename $1) = "ChangeLog.txt" ];then for PREPO in $REPOPLUS;do - # Not all repositories have the ChangeLog.txt, so I use md5 of PACKAGES.TXT instead - URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}PACKAGES.TXT + # Not all repositories have the ChangeLog.txt, so I use md5 of CHECKSUMS.md5 instead + URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 if echo $URLFILE | grep -q "^file://" ; then URLFILE=${URLFILE:6} - cp -v $URLFILE $2-tmp + cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO else - $DOWNLOADER $2-tmp ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}PACKAGES.TXT + $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 fi - echo $PREPO $(md5sum $2-tmp|awk '{print $1}') >>$2 - rm $2-tmp + echo $PREPO $(md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO|awk '{print $1}') >>$2 done fi if [ $(basename $1) = "GPG-KEY" ];then @@ -221,11 +208,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then touch ${TMPDIR}/waiting - # -- PKGLIST: - # temporary file used to store data about packages. It use - # the following format: - # repository::basename:: - # + # -- PKGLIST: + # temporary file used to store data about packages. It use + # the following format: + # repository::basename:: + # PKGLIST=$(tempfile --directory=$TMPDIR) PKGINFOS=$(tempfile --directory=$TMPDIR) @@ -384,6 +371,13 @@ if [ "$SLACKPKGPLUS" = "on" ];then if [ -z "$DOWNLOADER" ];then DOWNLOADER="wget --passive-ftp -O" fi + if [ "$VERBOSE" = "0" ];then + DOWNLOADER="wget -nv --passive-ftp -O" + elif [ "$VERBOSE" = "2" ];then + DOWNLOADER="wget --passive-ftp -O" + elif [ "$CMD" = "update" ];then + DOWNLOADER="wget -nv --passive-ftp -O" + fi # Global variable required by givepriority() # diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 22e8e57..02fa982 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -2,6 +2,12 @@ # Enable (on) / Disable (off) slackpkg+ SLACKPKGPLUS=on +# set to '0' to never show the download progress bar +# set to '1' to show the bar only in download packages (default) +# set to '2' to show always show the download bar +VERBOSE=1 + + # If two or more repositories contains some same packages, you can specify # from which repository you prefer to search it. # The syntax is ":" diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 3c977e5..7fe538c 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -2,6 +2,11 @@ # Enable (on) / Disable (off) slackpkg+ SLACKPKGPLUS=on +# set to '0' to never show the download progress bar +# set to '1' to show the bar only in download packages (default) +# set to '2' to show always show the download bar +VERBOSE=1 + # If two or more repositories contains some same packages, you can specify # from which repository you prefer to search it. # The syntax is ":"