Skip to content

Commit

Permalink
Remove ashism ==
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Bellard committed Feb 26, 2019
1 parent 8d36b14 commit 8f54c3c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions rootfs/lib/libtaz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ confirm() {
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
Expand Down Expand Up @@ -250,7 +250,7 @@ footer() {
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}
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/bin/ipinfo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
. /etc/network.conf

if [ "$WIFI" == "yes" ]; then
if [ "$WIFI" = "yes" ]; then
iface="$WIFI_INTERFACE"
else
iface="$INTERFACE"
Expand Down
6 changes: 3 additions & 3 deletions rootfs/usr/bin/man
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if [ -n "$MANPAGE" ]; then
# 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"
Expand All @@ -127,10 +127,10 @@ if [ -n "$MANPAGE" ]; then
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;}
Expand Down
4 changes: 2 additions & 2 deletions rootfs/usr/lib/slitaz/httphelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ ddcut() {
}


[ "$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$$)
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/lib/slitaz/libpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ check_mirror_id() {
_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
Expand Down
2 changes: 1 addition & 1 deletion test-libtaz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8f54c3c

Please sign in to comment.