slitaz-forge rev 698

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 08:22:34 2019 +0100 (2019-02-26)
parents ccbd176f0619
children cc22361540d1
files chub/web/lib/makegraphs dvd/mkpkgiso mirror/floppies/mkfdrolling.sh mirror/info/bin/chksrc mirror/info/bin/makegraphs pangolin/makegraphs pkgs/mirror-search.sh pkgs/search.sh roadmap/roadmap.cgi scn/plugins/mybugs/user.sh tank/tank tank/web/lib/chkpkgs tank/web/lib/makegraphs usbkey/helper.sh
line diff
     1.1 --- a/chub/web/lib/makegraphs	Mon Oct 08 23:27:48 2018 +0300
     1.2 +++ b/chub/web/lib/makegraphs	Tue Feb 26 08:22:34 2019 +0100
     1.3 @@ -153,7 +153,7 @@
     1.4  
     1.5  updatediskgraph() {
     1.6  	period=$1
     1.7 -	[ "$period" == "day" ] && maxdisk="$(getmax disk)"
     1.8 +	[ "$period" = "day" ] && maxdisk="$(getmax disk)"
     1.9  	info=""
    1.10  	[ -r $2 ] &&
    1.11  	info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \
    1.12 @@ -289,7 +289,7 @@
    1.13  	local i
    1.14  	d=$(stat -c %04D $1)
    1.15  	for i in /dev/* ; do 
    1.16 -		[ $(stat -c "%02t%02T" $i) == $d ] || continue
    1.17 +		[ $(stat -c "%02t%02T" $i) = $d ] || continue
    1.18  		echo $i
    1.19  		break
    1.20  	done
     2.1 --- a/dvd/mkpkgiso	Mon Oct 08 23:27:48 2018 +0300
     2.2 +++ b/dvd/mkpkgiso	Tue Feb 26 08:22:34 2019 +0100
     2.3 @@ -50,7 +50,7 @@
     2.4  fi
     2.5  
     2.6  # Update hg repos
     2.7 -if [ "$PKG_VER" == "update-hg" ]; then
     2.8 +if [ "$PKG_VER" = "update-hg" ]; then
     2.9  	for i in $1/* ; do
    2.10  		grep -qs '\[paths]' $i/.hg/hgrc || continue
    2.11  		cd $i
    2.12 @@ -124,7 +124,7 @@
    2.13  DIR=\$(cd \$(busybox dirname \$0); pwd)
    2.14  
    2.15  # Handle --auto-install case
    2.16 -if [ "\$DIR" == "/etc/init.d" ]; then
    2.17 +if [ "\$DIR" = "/etc/init.d" ]; then
    2.18    DIR=/cdrom
    2.19    if [ ! -f /cdrom/install.sh ]; then
    2.20      mkdir /cdrom 2> /dev/null
    2.21 @@ -325,7 +325,7 @@
    2.22  	need $iso
    2.23  	which isoinfo > /dev/null || need /usr/bin/isoinfo
    2.24  	isoinfo -R -l -i $iso | awk '/^Directory/ { path=$4 } /^-/ { print path$12  }' | while read file; do
    2.25 -		[ "$(basename $file)" == ".." ] && continue
    2.26 +		[ "$(basename $file)" = ".." ] && continue
    2.27  		[ "$file" = "/boot/isolinux/boot.cat" ] && continue
    2.28  		[ -d "$(dirname $TEMP_DIR/$file)" ] ||
    2.29  			mkdir -p "$(dirname $TEMP_DIR/$file)"
     3.1 --- a/mirror/floppies/mkfdrolling.sh	Mon Oct 08 23:27:48 2018 +0300
     3.2 +++ b/mirror/floppies/mkfdrolling.sh	Tue Feb 26 08:22:34 2019 +0100
     3.3 @@ -45,7 +45,7 @@
     3.4  		awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies:
     3.5  		<tt>fd001.img</tt> to <tt>$(ls -r fd${i}* | sed q)</tt>.<br>
     3.6  		$flavor provides $(while read f d; do 
     3.7 -			[ $f == $flavor ] && echo $d; done <<EOT
     3.8 +			[ $f = $flavor ] && echo $d; done <<EOT
     3.9  base the minimum SliTaz distribution subset in text mode
    3.10  justx the minimum SliTaz distribution subset with X11 support
    3.11  gtkonly the minimum SliTaz distribution subset with GTK+ support
     4.1 --- a/mirror/info/bin/chksrc	Mon Oct 08 23:27:48 2018 +0300
     4.2 +++ b/mirror/info/bin/chksrc	Tue Feb 26 08:22:34 2019 +0100
     4.3 @@ -34,7 +34,7 @@
     4.4  	. $i
     4.5  	[ -n "$WANTED" ] && continue
     4.6  	for a in $HOST_ARCH ; do
     4.7 -		[ $a == i486 ] && continue
     4.8 +		[ $a = i486 ] && continue
     4.9  		unset TARBALL EXTRA_SOURCE_FILES WGET_URL WANTED PACKAGE VERSION
    4.10  		SLITAZ_ARCH=$a
    4.11  		ARCH=$a
    4.12 @@ -77,10 +77,10 @@
    4.13  		grep -q ^$(basename $i)$ /tmp/tarball$$ && continue
    4.14  		;;
    4.15  	esac
    4.16 -	echo $i && [ "$PURGE" == "yes" ] && \rm -i $i
    4.17 +	echo $i && [ "$PURGE" = "yes" ] && \rm -i $i
    4.18  done
    4.19  rm -f /tmp/tarball$$ /tmp/wget_url$$
    4.20  for i in $SRC2/?/* ; do
    4.21  	[ $(stat -c "%h" $i) -eq 1 ] && echo $i &&
    4.22 -	[ "$PURGE" == "yes" ] && echo "Purge $i" && rm -f $i
    4.23 +	[ "$PURGE" = "yes" ] && echo "Purge $i" && rm -f $i
    4.24  done
     5.1 --- a/mirror/info/bin/makegraphs	Mon Oct 08 23:27:48 2018 +0300
     5.2 +++ b/mirror/info/bin/makegraphs	Tue Feb 26 08:22:34 2019 +0100
     5.3 @@ -152,7 +152,7 @@
     5.4  updatediskgraph() {
     5.5  	period=$1
     5.6  	extra="--logarithmic --lower-limit 1"
     5.7 -	[ "$period" == "day" ] && maxdisk="$(getmax disk)" && extra=""
     5.8 +	[ "$period" = "day" ] && maxdisk="$(getmax disk)" && extra=""
     5.9  	info="$(fdisk -l 2> /dev/null | sed '/dev/!d;s|.*: \(.*\), .*|\1|;q')"
    5.10  	[ -n "$info" ] && info="[ $info ]"
    5.11  	[ -r $2 ] &&
    5.12 @@ -339,7 +339,7 @@
    5.13  	local i
    5.14  	d=$(stat -c %04D $1)
    5.15  	for i in /dev/* ; do 
    5.16 -		[ $(stat -c "%02t%02T" $i) == $d ] || continue
    5.17 +		[ $(stat -c "%02t%02T" $i) = $d ] || continue
    5.18  		echo $i
    5.19  		break
    5.20  	done
     6.1 --- a/pangolin/makegraphs	Mon Oct 08 23:27:48 2018 +0300
     6.2 +++ b/pangolin/makegraphs	Tue Feb 26 08:22:34 2019 +0100
     6.3 @@ -159,7 +159,7 @@
     6.4  
     6.5  updatediskgraph() {
     6.6  	period=$1
     6.7 -	[ "$period" == "day" ] && maxdisk="$(getmax disk)"
     6.8 +	[ "$period" = "day" ] && maxdisk="$(getmax disk)"
     6.9  	info=""
    6.10  	[ -r $2 ] &&
    6.11  	info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \
    6.12 @@ -314,7 +314,7 @@
    6.13  	local i
    6.14  	d=$(stat -c %04D $1)
    6.15  	for i in /dev/* ; do 
    6.16 -		[ $(stat -c "%02t%02T" $i) == $d ] || continue
    6.17 +		[ $(stat -c "%02t%02T" $i) = $d ] || continue
    6.18  		echo $i
    6.19  		break
    6.20  	done
     7.1 --- a/pkgs/mirror-search.sh	Mon Oct 08 23:27:48 2018 +0300
     7.2 +++ b/pkgs/mirror-search.sh	Tue Feb 26 08:22:34 2019 +0100
     7.3 @@ -123,7 +123,7 @@
     7.4  for i in $(echo $QUERY_STRING | sed 's/[?&]/ /g'); do
     7.5  #	SLITAZ_VERSION=cooking
     7.6  	case "$(echo $i | tr [A-Z] [a-z])" in
     7.7 -		query=*|search=*)		[ ${i#*=} == Search ] || SEARCH=${i#*=};;
     7.8 +		query=*|search=*)		[ ${i#*=} = Search ] || SEARCH=${i#*=};;
     7.9  		object=*)				OBJECT=${i#*=};;
    7.10  		verbose=*)				VERBOSE=${i#*=};;
    7.11  		lang=*)					LANG=${i#*=};;
    7.12 @@ -150,7 +150,7 @@
    7.13  done
    7.14  [ -z "$SLITAZ_VERSION" ] && SLITAZ_VERSION=cooking
    7.15  #[ -n "$SEARCH" ] && REQUEST_METHOD="POST"
    7.16 -#[ "$SEARCH" == "." ] && SEARCH=
    7.17 +#[ "$SEARCH" = "." ] && SEARCH=
    7.18  
    7.19  
    7.20  # Content negotiation for Gettext
    7.21 @@ -945,7 +945,7 @@
    7.22  		. $WOK/$pkg/receipt
    7.23  		DESC=" <a href=\"?object=Desc&query=$pkg&lang=$lang&version=$SLITAZ_VERSION&submit=go\">$(gettext description)</a>"
    7.24  		[ -f $WOK/$pkg/description.txt ] || DESC=""
    7.25 -		[ "$CATEGORY" == "$SEARCH" ] && cat << _EOT_
    7.26 +		[ "$CATEGORY" = "$SEARCH" ] && cat << _EOT_
    7.27  $(package_entry)$DESC
    7.28  _EOT_
    7.29  	done
    7.30 @@ -964,7 +964,7 @@
    7.31  		. $WOK/$pkg/receipt
    7.32  		DESC=" <a href=\"?object=Desc&query=$pkg&lang=$lang&version=$SLITAZ_VERSION&submit=go\">$(gettext description)</a>"
    7.33  		[ -f $WOK/$pkg/description.txt ] || DESC=""
    7.34 -		[ "$MAINTAINER" == "$SEARCH" ] && cat << _EOT_
    7.35 +		[ "$MAINTAINER" = "$SEARCH" ] && cat << _EOT_
    7.36  $(package_entry)$DESC
    7.37  _EOT_
    7.38  	done
     8.1 --- a/pkgs/search.sh	Mon Oct 08 23:27:48 2018 +0300
     8.2 +++ b/pkgs/search.sh	Tue Feb 26 08:22:34 2019 +0100
     8.3 @@ -76,7 +76,7 @@
     8.4  
     8.5  nice_url() {
     8.6  	# if user submitted a form
     8.7 -	if [ "$REQUEST_METHOD" == 'POST' -o -n "$(GET submit)" ]; then
     8.8 +	if [ "$REQUEST_METHOD" = 'POST' -o -n "$(GET submit)" ]; then
     8.9  		OBJECT="$(GETPOST object)"
    8.10  		SEARCH="$(GETPOST query)"
    8.11  		case $OBJECT in
    8.12 @@ -120,7 +120,7 @@
    8.13  
    8.14  		# debug, if needed
    8.15  		debugq="$(GET debug)"
    8.16 -		if [ -n "$debugq" -a "$debugq" == 'debug' ]; then
    8.17 +		if [ -n "$debugq" -a "$debugq" = 'debug' ]; then
    8.18  			NICE="$NICE&debug"
    8.19  		fi
    8.20  
    8.21 @@ -181,7 +181,7 @@
    8.22  s='selected'
    8.23  for i in $(echo $QUERY_STRING | sed 's/[?&]/ /g'); do
    8.24  	case "$(echo $i | tr [A-Z] [a-z])" in
    8.25 -		query=*|search=*)		[ ${i#*=} == Search ] || SEARCH=${i#*=};;
    8.26 +		query=*|search=*)		[ ${i#*=} = Search ] || SEARCH=${i#*=};;
    8.27  		object=*)				OBJECT=${i#*=};;
    8.28  		verbose=*)				VERBOSE=${i#*=};;
    8.29  		lang=*)					LANG=${i#*=};;
    8.30 @@ -228,7 +228,7 @@
    8.31  SEARCH="$(echo $SEARCH | sed 's|%2B|+|g; s|%3A|:|g; s|%2F|/|g')"
    8.32  
    8.33  SLITAZ_HOME="/home/slitaz"
    8.34 -if [ "$SLITAZ_VERSION" == 'cooking' ]; then
    8.35 +if [ "$SLITAZ_VERSION" = 'cooking' ]; then
    8.36  	WOK="$SLITAZ_HOME/wok"
    8.37  else
    8.38  	WOK="$SLITAZ_HOME/wok-$SLITAZ_VERSION"
    8.39 @@ -942,7 +942,7 @@
    8.40  # page begins
    8.41  #
    8.42  
    8.43 -if [ -n "$HTTP_IF_MODIFIED_SINCE" -a "$HTTP_IF_MODIFIED_SINCE" == "$lastmod" ]; then
    8.44 +if [ -n "$HTTP_IF_MODIFIED_SINCE" -a "$HTTP_IF_MODIFIED_SINCE" = "$lastmod" ]; then
    8.45  	# When user agent asks if content modified since last seen and it is not modified
    8.46  	header "HTTP/1.1 304 Not Modified"
    8.47  	exit 0
    8.48 @@ -984,7 +984,7 @@
    8.49  	esac
    8.50  
    8.51  	echo -n "<option class=\"$c\" value=\"$i\""
    8.52 -	[ "$i" == "${LANG%_*}" ] && echo -n " selected"
    8.53 +	[ "$i" = "${LANG%_*}" ] && echo -n " selected"
    8.54  	echo ">$l</option>"
    8.55  done
    8.56  echo '</select></div>'
     9.1 --- a/roadmap/roadmap.cgi	Mon Oct 08 23:27:48 2018 +0300
     9.2 +++ b/roadmap/roadmap.cgi	Tue Feb 26 08:22:34 2019 +0100
     9.3 @@ -36,13 +36,13 @@
     9.4  		for task in $(fgrep -H "$1" $taskdir/*.conf | cut -d ":" -f 1)
     9.5  		do
     9.6  			. $task
     9.7 -			if [ "$PRIORITY" == "$pr" ]; then
     9.8 +			if [ "$PRIORITY" = "$pr" ]; then
     9.9  				show_task
    9.10  			fi
    9.11  		done
    9.12  	done
    9.13 -	[ "$1" == "TODO" ] && [ "$todo" == "0" ] && echo "All done."
    9.14 -	[ "$1" == "DONE" ] && [ "$done" == "0" ] && echo "Nothing done."
    9.15 +	[ "$1" = "TODO" ] && [ "$todo" = "0" ] && echo "All done."
    9.16 +	[ "$1" = "DONE" ] && [ "$done" = "0" ] && echo "Nothing done."
    9.17  }
    9.18  
    9.19  # xHTML header.
    10.1 --- a/scn/plugins/mybugs/user.sh	Mon Oct 08 23:27:48 2018 +0300
    10.2 +++ b/scn/plugins/mybugs/user.sh	Tue Feb 26 08:22:34 2019 +0100
    10.3 @@ -48,7 +48,7 @@
    10.4  
    10.5  if [ "$show_more" ]; then
    10.6  	echo "<p>"
    10.7 -	if [ "$HTTP_HOST" == "bugs.slitaz.org" ]; then
    10.8 +	if [ "$HTTP_HOST" = "bugs.slitaz.org" ]; then
    10.9  		echo "<a href='?mybugs&user=$user'>$(gettext 'View all my bugs and messages')</a>"
   10.10  	else
   10.11  		echo "$(gettext 'View all my bugs and debug messages on:') "
    11.1 --- a/tank/tank	Mon Oct 08 23:27:48 2018 +0300
    11.2 +++ b/tank/tank	Tue Feb 26 08:22:34 2019 +0100
    11.3 @@ -48,13 +48,13 @@
    11.4  		# Update Tank web interface
    11.5  		echo -e "\nUpdating: tank.slitaz.org..."
    11.6  		cd $REPOS/slitaz-forge
    11.7 -		[ "$2" == "--nohg" ] || hg pull -u
    11.8 +		[ "$2" = "--nohg" ] || hg pull -u
    11.9  		rm -rf $VHOST/*.* $VHOST/images
   11.10  		cp -a tank/web/* $VHOST
   11.11  		# Be sure we have last version of libtaz.sh httphelper.sh
   11.12  		#echo "$(colorize 33 'Updating:') libtaz.sh && httphelper.sh"
   11.13  		#cd $REPOS/slitaz-base-files
   11.14 -		#[ "$2" == "--nohg" ] || hg pull -u
   11.15 +		#[ "$2" = "--nohg" ] || hg pull -u
   11.16  		#cp -f rootfs/lib/libtaz.sh /lib
   11.17  		#cp -f rootfs/usr/lib/slitaz/httphelper.sh /usr/lib/slitaz
   11.18  		echo "" ;;
   11.19 @@ -63,7 +63,7 @@
   11.20  		# Update People web interface
   11.21  		echo -e "\nUpdating: people.slitaz.org..."
   11.22  		cd $REPOS/slitaz-forge
   11.23 -		[ "$2" == "--nohg" ] || hg pull -u
   11.24 +		[ "$2" = "--nohg" ] || hg pull -u
   11.25  		rm -rf $WWW/people/*
   11.26  		cp -a people/* $WWW/people
   11.27  		echo "" ;;
   11.28 @@ -72,7 +72,7 @@
   11.29  		# Update Pro website
   11.30  		echo -e "\nUpdating: pro.slitaz.org..."
   11.31  		cd $REPOS/slitaz-forge
   11.32 -		[ "$2" == "--nohg" ] || hg pull -u
   11.33 +		[ "$2" = "--nohg" ] || hg pull -u
   11.34  		rm -rf $WWW/pro/web/*
   11.35  		cp -a pro/* $WWW/pro/web
   11.36  		echo "" ;;
   11.37 @@ -81,7 +81,7 @@
   11.38  		# Update Web Boot interface
   11.39  		echo -e "\nUpdating: boot.slitaz.org..."
   11.40  		cd $REPOS/slitaz-forge
   11.41 -		[ "$2" == "--nohg" ] || hg pull -u
   11.42 +		[ "$2" = "--nohg" ] || hg pull -u
   11.43  		rm -rf $WWW/boot/*
   11.44  		cp -a boot/* $WWW/boot
   11.45  		echo "" ;;
   11.46 @@ -90,9 +90,9 @@
   11.47  		# Update Web Boot interface
   11.48  		echo -e "\nUpdating: cook.slitaz.org..."
   11.49  		cd $REPOS/cookutils
   11.50 -		[ "$2" == "--nohg" ] || hg pull -u
   11.51 +		[ "$2" = "--nohg" ] || hg pull -u
   11.52  		cd $REPOS/slitaz-forge
   11.53 -		[ "$2" == "--nohg" ] || hg pull -u
   11.54 +		[ "$2" = "--nohg" ] || hg pull -u
   11.55  		cp -a cook/* $WWW/cook
   11.56  		# We use symlinks for cooker's
   11.57  		cd $WWW/cook && rm -f style.css
   11.58 @@ -124,7 +124,7 @@
   11.59  		# Update Roadmap Web interface
   11.60  		echo -e "\nUpdating: roadmap.slitaz.org..."
   11.61  		cd $REPOS/slitaz-forge
   11.62 -		[ "$2" == "--nohg" ] || hg pull -u
   11.63 +		[ "$2" = "--nohg" ] || hg pull -u
   11.64  		cp -a roadmap/* $WWW/roadmap
   11.65  		echo "" ;;
   11.66  		
   11.67 @@ -133,7 +133,7 @@
   11.68  		bugs="$WWW/bugs"
   11.69  		echo -e "\nUpdating: bugs.slitaz.org..."
   11.70  		cd $REPOS/tazbug
   11.71 -		[ "$2" == "--nohg" ] || hg pull -u
   11.72 +		[ "$2" = "--nohg" ] || hg pull -u
   11.73  		cp -a web/* ${bugs}
   11.74  		cp README ${bugs}
   11.75  		chown -R www.www ${bugs}
   11.76 @@ -143,7 +143,7 @@
   11.77  		# Update IRC interface
   11.78  		echo -e "\nUpdating: irc.slitaz.org..."
   11.79  		cd $REPOS/slitaz-forge
   11.80 -		[ "$2" == "--nohg" ] || hg pull -u
   11.81 +		[ "$2" = "--nohg" ] || hg pull -u
   11.82  		rm -rf $WWW/irc/images $WWW/irc/lib
   11.83  		cp -a irc/* $WWW/irc
   11.84  		echo "" ;;
    12.1 --- a/tank/web/lib/chkpkgs	Mon Oct 08 23:27:48 2018 +0300
    12.2 +++ b/tank/web/lib/chkpkgs	Tue Feb 26 08:22:34 2019 +0100
    12.3 @@ -10,7 +10,7 @@
    12.4  		VERSION=
    12.5  		EXTRAVERSION=
    12.6  		. $j
    12.7 -		[ "$i" == "$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ] && continue 2
    12.8 +		[ "$i" = "$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ] && continue 2
    12.9  	done
   12.10  	echo "Rebuild $i"
   12.11  done
    13.1 --- a/tank/web/lib/makegraphs	Mon Oct 08 23:27:48 2018 +0300
    13.2 +++ b/tank/web/lib/makegraphs	Tue Feb 26 08:22:34 2019 +0100
    13.3 @@ -159,7 +159,7 @@
    13.4  
    13.5  updatediskgraph() {
    13.6  	period=$1
    13.7 -	[ "$period" == "day" ] && maxdisk="$(getmax disk)"
    13.8 +	[ "$period" = "day" ] && maxdisk="$(getmax disk)"
    13.9  	info=""
   13.10  	[ -r $2 ] &&
   13.11  	info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \
   13.12 @@ -337,7 +337,7 @@
   13.13  	local i
   13.14  	d=$(stat -c %04D $1)
   13.15  	for i in /dev/* ; do 
   13.16 -		[ $(stat -c "%02t%02T" $i) == $d ] || continue
   13.17 +		[ $(stat -c "%02t%02T" $i) = $d ] || continue
   13.18  		echo $i
   13.19  		return
   13.20  	done
    14.1 --- a/usbkey/helper.sh	Mon Oct 08 23:27:48 2018 +0300
    14.2 +++ b/usbkey/helper.sh	Tue Feb 26 08:22:34 2019 +0100
    14.3 @@ -1,6 +1,6 @@
    14.4  #!/bin/sh
    14.5  
    14.6 -if [ "$1" == "--stats" ]; then
    14.7 +if [ "$1" = "--stats" ]; then
    14.8  	dir=$(dirname $0)/$2
    14.9  	if [ -n "$3" ]; then
   14.10  		sed 's/.*"\([0-9]* Gb\)".*/\1/' $dir/?/* | sort | awk '{