tazpkg rev 976 tip

misc typos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 09 12:03:43 2021 +0000 (12 months ago)
parents d2c123d1284a
children
files modules/convert modules/flavor modules/getenv modules/help modules/info modules/list modules/mkdb oldstuff/libtazpkgbox tazpanel/pkgs.cgi
line diff
     1.1 --- a/modules/convert	Thu Sep 24 07:50:22 2020 +0100
     1.2 +++ b/modules/convert	Tue Nov 09 12:03:43 2021 +0000
     1.3 @@ -352,7 +352,7 @@
     1.4  	unsquashfs "$PACKAGE_FILE"
     1.5  	mv squashfs-root fs
     1.6  	set -- $(cat fs/pet.specs)
     1.7 -	desc="$10"
     1.8 +	desc="${10}"
     1.9  	finish_convert_puppy
    1.10  }
    1.11  
     2.1 --- a/modules/flavor	Thu Sep 24 07:50:22 2020 +0100
     2.2 +++ b/modules/flavor	Tue Nov 09 12:03:43 2021 +0000
     2.3 @@ -19,9 +19,9 @@
     2.4  	case "$1" in
     2.5  		# Mirror URL can have a trailing slash or not.
     2.6  		http://* | https://* | ftp://*)
     2.7 -			wget -c -q -T 30 -U $UA ${1%/}/$2 2>/dev/null && break ;;
     2.8 +			wget -c -q -T 30 -U $UA ${1%/}/$2 2>/dev/null && return ;;
     2.9  		*)
    2.10 -			ln -sf ${1%/}/$2 . && break ;;
    2.11 +			ln -sf ${1%/}/$2 . && return ;;
    2.12  	esac
    2.13  }
    2.14  
     3.1 --- a/modules/getenv	Thu Sep 24 07:50:22 2020 +0100
     3.2 +++ b/modules/getenv	Tue Nov 09 12:03:43 2021 +0000
     3.3 @@ -11,7 +11,7 @@
     3.4  	du egrep fgrep find grep gzip head httpd id ln ls lzcat md5sum mkdir mktemp mv readlink \
     3.5  	realpath rm rmdir rpm rpm2cpio sed sort stat su tac tail tar tee touch tr tty uniq unlzma wc \
     3.6  	wget which xzcat zcat; do
     3.7 -	alias $i="busybox $i"
     3.8 +	eval alias $i="busybox $i"
     3.9  done
    3.10  
    3.11  
     4.1 --- a/modules/help	Thu Sep 24 07:50:22 2020 +0100
     4.2 +++ b/modules/help	Tue Nov 09 12:03:43 2021 +0000
     4.3 @@ -109,7 +109,7 @@
     4.4  :upgrade,up::setup-mirror,sm::add-undigest,setup-undigest::list-undigest:\
     4.5  :remove-undigest:"
     4.6  
     4.7 -if [ ! $(echo $commands | grep -e "[:,]$T[:,]") ]; then
     4.8 +if ! echo $commands | grep -qe "[:,]$T[:,]"; then
     4.9  	try1=$(echo $commands | grep -oe ":[^:]*$T[^:]*:")
    4.10  	if [ -z "$try1" ]; then
    4.11  		_ 'Sorry, no help for "%s"' "$QUERY"; newline; exit 0
    4.12 @@ -171,7 +171,7 @@
    4.13  
    4.14  PRE2=$(echo "$OPT0" | sed "s|$OPTA|$OPTB|" | tr '@' '\n' | sed '/O/d; s|L||')
    4.15  
    4.16 -[ ! -z "$TA" ] && T="$T, $TA"
    4.17 +[ -n "$TA" ] && T="$T, $TA"
    4.18  
    4.19  title '%s' "$title"
    4.20  emsg "$(longline "$PRE2" | sed 's|A|<c 33>|g; s|B|<c 36>|g; s|C|</b>|g; s|D|</c>|g; ')"
     5.1 --- a/modules/info	Thu Sep 24 07:50:22 2020 +0100
     5.2 +++ b/modules/info	Tue Nov 09 12:03:43 2021 +0000
     5.3 @@ -33,15 +33,15 @@
     5.4  	. "$INSTALLED/$1/receipt"
     5.5  	STATE=$(_ 'installed package')
     5.6  
     5.7 -	if [ -e "$PKGS_DB/packages.info" ]; then
     5.8 +	if [ -s "$PKGS_DB/packages.info" ]; then
     5.9  		# Check if upgrade available
    5.10  		NEWVER=$(awk -F$'\t' -vp="$1" '$1==p{print $2}' "$PKGS_DB/packages.info")
    5.11 -		if [ "$VERSION" != "$NEWVER" ]; then
    5.12 +		if [ "$VERSION" != "${NEWVER:-$VERSION}" ]; then
    5.13  			VERSION="$VERSION $(_n '(new version "%s" available)' "$NEWVER")"
    5.14  		else
    5.15  			OLDMD5=$(awk -F$'\t' -vp="$1" '$1==p{print $9}' "$PKGS_DB/installed.info")
    5.16  			NEWMD5=$(awk -F$'\t' -vp="$1" '$1==p{print $9}' "$PKGS_DB/packages.info")
    5.17 -			if [ "$OLDMD5" != "$NEWMD5" ]; then
    5.18 +			if [ "$OLDMD5" != "${NEWMD5:-$OLDMD5}" ]; then
    5.19  				VERSION="$VERSION $(_n '(new build available)')"
    5.20  			fi
    5.21  		fi
     6.1 --- a/modules/list	Thu Sep 24 07:50:22 2020 +0100
     6.2 +++ b/modules/list	Tue Nov 09 12:03:43 2021 +0000
     6.3 @@ -290,7 +290,7 @@
     6.4  					done
     6.5  				fi
     6.6  				[ -n "$SUGGESTED" ] && cat <<EOT
     6.7 -$(boldify $(echo "$PACKAGE"):) $SUGGESTED
     6.8 +$(boldify ${PACKAGE}:) $SUGGESTED
     6.9  EOT
    6.10  			fi
    6.11  		done
     7.1 --- a/modules/mkdb	Thu Sep 24 07:50:22 2020 +0100
     7.2 +++ b/modules/mkdb	Tue Nov 09 12:03:43 2021 +0000
     7.3 @@ -180,7 +180,7 @@
     7.4  		cpio -F "$folder/$pkgfile" -i description.txt >/dev/null 2>&1
     7.5  		# Append descriptions DB
     7.6  		echo "$PACKAGE" >> "$DBd"
     7.7 -		cat description.txt | sed 's|^$| |' >> "$DBd"
     7.8 +		sed 's|^$| |' < description.txt >> "$DBd"
     7.9  		echo >> "$DBd"
    7.10  		rm description.txt
    7.11  	fi
     8.1 --- a/oldstuff/libtazpkgbox	Thu Sep 24 07:50:22 2020 +0100
     8.2 +++ b/oldstuff/libtazpkgbox	Tue Nov 09 12:03:43 2021 +0000
     8.3 @@ -605,7 +605,7 @@
     8.4  			SHORT_DESC=`echo "$RES" | cut -d "|" -f 3`
     8.5  			CATEGORY=`echo "$RES" | cut -d "|" -f 4`
     8.6  			WEB_SITE=`echo "$RES" | cut -d "|" -f 5`
     8.7 -			SIZES=`grep -sh -A 3 "^$(echo $PACKAGE)$" /var/lib/tazpkg/packages.txt \
     8.8 +			SIZES=`grep -sh -A 3 "^${PACKAGE}$" /var/lib/tazpkg/packages.txt \
     8.9  				/var/lib/tazpkg/undigest/*/packages.txt | tail -1`
    8.10  			DEPENDS=""
    8.11  			SUGGESTED=""
     9.1 --- a/tazpanel/pkgs.cgi	Thu Sep 24 07:50:22 2020 +0100
     9.2 +++ b/tazpanel/pkgs.cgi	Tue Nov 09 12:03:43 2021 +0000
     9.3 @@ -1392,7 +1392,7 @@
     9.4  				case $pkg in
     9.5  					*.htm*) cat $pkg ;;
     9.6  					*)	echo "<pre style=\"white-space: pre-wrap\">"
     9.7 -						cat $pkg | htmlize | sed 's|\([hf]t*t*ps*://[a-zA-Z0-9./_-]*[a-zA-Z0-9/_-]\)|<a href="\1">\1</a>|'
     9.8 +						htmlize < $pkg | sed 's|\([hf]t*t*ps*://[a-zA-Z0-9./_-]*[a-zA-Z0-9/_-]\)|<a href="\1">\1</a>|'
     9.9  						echo "</pre>"
    9.10  						;;
    9.11  				esac
    9.12 @@ -1755,21 +1755,21 @@
    9.13  		<tr>
    9.14  			<td>$(_ 'Installed packages:')</td>
    9.15  			<td><a href="?list&amp;my=my&amp;cat=all&amp;repo=Any">
    9.16 -				<b>$(cat $PKGS_DB/installed.info | wc -l)</b>
    9.17 +				<b>$(wc -l < $PKGS_DB/installed.info)</b>
    9.18  				</a></td></tr>
    9.19  		<tr>
    9.20  			<td>$(_ 'Mirrored packages:')</td>
    9.21  			<td><a href="?list&amp;my=no&amp;cat=all&amp;repo=Any">
    9.22 -				<b>$(cat $PKGS_DB/packages.list | wc -l)</b>
    9.23 +				<b>$(wc -l < $PKGS_DB/packages.list)</b>
    9.24  				</a></td></tr>
    9.25  		<tr>
    9.26  			<td>$(_ 'Upgradeable packages:')</td>
    9.27  			<td><a href="?up">
    9.28 -				<b>$(cat $PKGS_DB/packages.up | wc -l)</b>
    9.29 +				<b>$(wc -l < $PKGS_DB/packages.up)</b>
    9.30  				</a></td></tr>
    9.31  		<tr>
    9.32  			<td>$(_ 'Installed files:')</td>
    9.33 -			<td><b>$(cat $INSTALLED/*/files.list | wc -l)</b></td></tr>
    9.34 +			<td><b>$(wc -l $INSTALLED/*/files.list)</b></td></tr>
    9.35  		<tr>
    9.36  			<td>$(_ 'Blocked packages:')</td>
    9.37  			<td><a href="?blocked">