# HG changeset patch # User Pascal Bellard # Date 1551165730 -3600 # Node ID dc2507062df39515f2ffb27229079b555863d68b # Parent 3b8ba0fadc4f4a20c78efa507ceebbcef1ae4d71 Remove ashism == diff -r 3b8ba0fadc4f -r dc2507062df3 rootfs/lib/libtaz.sh --- a/rootfs/lib/libtaz.sh Mon Jan 14 10:40:20 2019 +0100 +++ b/rootfs/lib/libtaz.sh Tue Feb 26 08:22:10 2019 +0100 @@ -200,7 +200,7 @@ translate_query "$answer"; echo ' (auto)' fi # Return true/false to use in conditions - [ "$answer" == "$(translate_query y)" -o "$answer" == "$(translate_query Y)" ] + [ "$answer" = "$(translate_query y)" -o "$answer" = "$(translate_query Y)" ] } # Log activities @@ -250,7 +250,7 @@ saved_action='' action() { saved_action="$(_n "$@")" - [ "$quiet" == 'yes' ] && return + [ "$quiet" = 'yes' ] && return local w c scol msg chars # Translators: 'w' is the width the wider translated message ('[ Done ]' or '[ Failed ]') takes in a terminal; place here the number w=$(_ 'w'); w=${w/w/10} diff -r 3b8ba0fadc4f -r dc2507062df3 rootfs/usr/bin/ipinfo --- a/rootfs/usr/bin/ipinfo Mon Jan 14 10:40:20 2019 +0100 +++ b/rootfs/usr/bin/ipinfo Tue Feb 26 08:22:10 2019 +0100 @@ -4,7 +4,7 @@ # . /etc/network.conf -if [ "$WIFI" == "yes" ]; then +if [ "$WIFI" = "yes" ]; then iface="$WIFI_INTERFACE" else iface="$INTERFACE" diff -r 3b8ba0fadc4f -r dc2507062df3 rootfs/usr/bin/man --- a/rootfs/usr/bin/man Mon Jan 14 10:40:20 2019 +0100 +++ b/rootfs/usr/bin/man Tue Feb 26 08:22:10 2019 +0100 @@ -108,7 +108,7 @@ # Use nroff if available; it outputs control chars, which busybox less # cannot handle: use "more" instead (or GNU less) if [ -x /usr/bin/nroff ]; then - if [ x$(readlink $(which less)) == x/bin/busybox ]; then + if [ x$(readlink $(which less)) = x/bin/busybox ]; then VIEW_CMD="more" else VIEW_CMD="less -rM" @@ -127,10 +127,10 @@ fi fi -if [ "$SECTION" == 'all' ]; then +if [ "$SECTION" = 'all' ]; then #search alphabetically LETTER=$(printf "${TOPIC::1}" | tr 'A-Z[:punct:][:digit:]' a-z00) - if [ $LETTER == '0' ]; then LETTER=other; fi + if [ $LETTER = '0' ]; then LETTER=other; fi SECTIONS=$(wget -q -O - http://linux.die.net/man/$LETTER.html | \ sed -n -r "s%.*href=\"(.)/$TOPIC\".*%\1%p") [ -n "$SECTIONS" ] || { _ 'No manual entry for %s' "$TOPIC"; exit 0;} diff -r 3b8ba0fadc4f -r dc2507062df3 rootfs/usr/lib/slitaz/httphelper.sh --- a/rootfs/usr/lib/slitaz/httphelper.sh Mon Jan 14 10:40:20 2019 +0100 +++ b/rootfs/usr/lib/slitaz/httphelper.sh Tue Feb 26 08:22:10 2019 +0100 @@ -157,8 +157,8 @@ } -[ "$1" == "--skip-post" ] || -if [ "$REQUEST_METHOD$POST__NAMES" == "POST" ]; then +[ "$1" = "--skip-post" ] || +if [ "$REQUEST_METHOD$POST__NAMES" = "POST" ]; then prefix=/tmp/httpd_post mkdir $prefix$$ now=$(stat -c %Y $prefix$$) diff -r 3b8ba0fadc4f -r dc2507062df3 rootfs/usr/lib/slitaz/libpkg.sh --- a/rootfs/usr/lib/slitaz/libpkg.sh Mon Jan 14 10:40:20 2019 +0100 +++ b/rootfs/usr/lib/slitaz/libpkg.sh Tue Feb 26 08:22:10 2019 +0100 @@ -32,7 +32,7 @@ _n 'Mirror is unreachable' false; status; return 1 fi - if [ "$(cat ID)" == "$(cat ID.bak)" ]; then + if [ "$(cat ID)" = "$(cat ID.bak)" ]; then _n 'Mirror is up-to-date' true; status; return 1 fi diff -r 3b8ba0fadc4f -r dc2507062df3 test-libtaz.sh --- a/test-libtaz.sh Mon Jan 14 10:40:20 2019 +0100 +++ b/test-libtaz.sh Tue Feb 26 08:22:10 2019 +0100 @@ -4,7 +4,7 @@ [ $# -eq 0 ] && title 'Check variables import using libtaz.sh' -if [ "$1" == 'test' ]; then env; exit 0; fi +if [ "$1" = 'test' ]; then env; exit 0; fi ME=$(realpath $0); n=/tmp/n; echo 1 > $n; tests=18