slitaz-base-files rev 340

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 08:22:10 2019 +0100 (8 months ago)
parents 3b8ba0fadc4f
children a3dd7551a6cf
files rootfs/lib/libtaz.sh rootfs/usr/bin/ipinfo rootfs/usr/bin/man rootfs/usr/lib/slitaz/httphelper.sh rootfs/usr/lib/slitaz/libpkg.sh test-libtaz.sh
line diff
     1.1 --- a/rootfs/lib/libtaz.sh	Mon Jan 14 10:40:20 2019 +0100
     1.2 +++ b/rootfs/lib/libtaz.sh	Tue Feb 26 08:22:10 2019 +0100
     1.3 @@ -200,7 +200,7 @@
     1.4  		translate_query "$answer"; echo ' (auto)'
     1.5  	fi
     1.6  	# Return true/false to use in conditions
     1.7 -	[ "$answer" == "$(translate_query y)" -o "$answer" == "$(translate_query Y)" ]
     1.8 +	[ "$answer" = "$(translate_query y)" -o "$answer" = "$(translate_query Y)" ]
     1.9  }
    1.10  
    1.11  # Log activities
    1.12 @@ -250,7 +250,7 @@
    1.13  saved_action=''
    1.14  action() {
    1.15  	saved_action="$(_n "$@")"
    1.16 -	[ "$quiet" == 'yes' ] && return
    1.17 +	[ "$quiet" = 'yes' ] && return
    1.18  	local w c scol msg chars
    1.19  	# Translators: 'w' is the width the wider translated message ('[ Done ]' or '[ Failed ]') takes in a terminal; place here the number
    1.20  	w=$(_ 'w'); w=${w/w/10}
     2.1 --- a/rootfs/usr/bin/ipinfo	Mon Jan 14 10:40:20 2019 +0100
     2.2 +++ b/rootfs/usr/bin/ipinfo	Tue Feb 26 08:22:10 2019 +0100
     2.3 @@ -4,7 +4,7 @@
     2.4  #
     2.5  . /etc/network.conf
     2.6  
     2.7 -if [ "$WIFI" == "yes" ]; then
     2.8 +if [ "$WIFI" = "yes" ]; then
     2.9  	iface="$WIFI_INTERFACE"
    2.10  else
    2.11  	iface="$INTERFACE"
     3.1 --- a/rootfs/usr/bin/man	Mon Jan 14 10:40:20 2019 +0100
     3.2 +++ b/rootfs/usr/bin/man	Tue Feb 26 08:22:10 2019 +0100
     3.3 @@ -108,7 +108,7 @@
     3.4  	# Use nroff if available; it outputs control chars, which busybox less
     3.5  	# cannot handle: use "more" instead (or GNU less)
     3.6  	if [ -x /usr/bin/nroff ]; then
     3.7 -		if [ x$(readlink $(which less)) == x/bin/busybox ]; then
     3.8 +		if [ x$(readlink $(which less)) = x/bin/busybox ]; then
     3.9  			VIEW_CMD="more"
    3.10  		else
    3.11  			VIEW_CMD="less -rM"
    3.12 @@ -127,10 +127,10 @@
    3.13  	fi
    3.14  fi
    3.15  
    3.16 -if [ "$SECTION" == 'all' ]; then
    3.17 +if [ "$SECTION" = 'all' ]; then
    3.18  	#search alphabetically
    3.19  	LETTER=$(printf "${TOPIC::1}" | tr 'A-Z[:punct:][:digit:]' a-z00)
    3.20 -	if [ $LETTER == '0' ]; then LETTER=other; fi
    3.21 +	if [ $LETTER = '0' ]; then LETTER=other; fi
    3.22  	SECTIONS=$(wget -q -O - http://linux.die.net/man/$LETTER.html | \
    3.23  		sed -n -r "s%.*href=\"(.)/$TOPIC\".*%\1%p")
    3.24  	[ -n "$SECTIONS" ] || { _ 'No manual entry for %s' "$TOPIC"; exit 0;}
     4.1 --- a/rootfs/usr/lib/slitaz/httphelper.sh	Mon Jan 14 10:40:20 2019 +0100
     4.2 +++ b/rootfs/usr/lib/slitaz/httphelper.sh	Tue Feb 26 08:22:10 2019 +0100
     4.3 @@ -157,8 +157,8 @@
     4.4  }
     4.5  
     4.6  
     4.7 -[ "$1" == "--skip-post" ] ||
     4.8 -if [ "$REQUEST_METHOD$POST__NAMES" == "POST" ]; then
     4.9 +[ "$1" = "--skip-post" ] ||
    4.10 +if [ "$REQUEST_METHOD$POST__NAMES" = "POST" ]; then
    4.11  	prefix=/tmp/httpd_post
    4.12  	mkdir $prefix$$
    4.13  	now=$(stat -c %Y $prefix$$)
     5.1 --- a/rootfs/usr/lib/slitaz/libpkg.sh	Mon Jan 14 10:40:20 2019 +0100
     5.2 +++ b/rootfs/usr/lib/slitaz/libpkg.sh	Tue Feb 26 08:22:10 2019 +0100
     5.3 @@ -32,7 +32,7 @@
     5.4  		_n 'Mirror is unreachable'
     5.5  		false; status; return 1
     5.6  	fi
     5.7 -	if [ "$(cat ID)" == "$(cat ID.bak)" ]; then
     5.8 +	if [ "$(cat ID)" = "$(cat ID.bak)" ]; then
     5.9  		_n 'Mirror is up-to-date'
    5.10  		true; status; return 1
    5.11  	fi
     6.1 --- a/test-libtaz.sh	Mon Jan 14 10:40:20 2019 +0100
     6.2 +++ b/test-libtaz.sh	Tue Feb 26 08:22:10 2019 +0100
     6.3 @@ -4,7 +4,7 @@
     6.4  
     6.5  [ $# -eq 0 ] && title 'Check variables import using libtaz.sh'
     6.6  
     6.7 -if [ "$1" == 'test' ]; then env; exit 0; fi
     6.8 +if [ "$1" = 'test' ]; then env; exit 0; fi
     6.9  
    6.10  ME=$(realpath $0); n=/tmp/n; echo 1 > $n; tests=18
    6.11