slitaz-dev-tools rev 309
Remove ashism ==
line diff
1.1 --- a/mirror-tools/rootfs/home/backups/mirror/backup.sh Fri May 18 15:57:37 2018 +0200 1.2 +++ b/mirror-tools/rootfs/home/backups/mirror/backup.sh Tue Feb 26 08:23:49 2019 +0100 1.3 @@ -34,9 +34,9 @@ 1.4 SSH="ssh -i /home/$BACKUP_USER/.ssh/id_rsa -o PasswordAuthentication=no" 1.5 1.6 cd $(dirname $0) 1.7 -[ $(id -u) == 0 ] || exit 1 1.8 -[ $(hostname) == $(basename $PWD) -o \ 1.9 - $(hostname) == $(basename $PWD).slitaz.org ] || exit 1 1.10 +[ $(id -u) = 0 ] || exit 1 1.11 +[ $(hostname) = $(basename $PWD) -o \ 1.12 + $(hostname) = $(basename $PWD).slitaz.org ] || exit 1 1.13 1.14 rotate() 1.15 { 1.16 @@ -77,7 +77,7 @@ 1.17 chmod 700 * 1.18 1.19 [ -n "$REMOTE_USER" ] && for i in $(cd .. ; ls); do 1.20 - [ $i == $(hostname) -o $i.slitaz.org == $(hostname) ] && continue 1.21 + [ $i = $(hostname) -o $i.slitaz.org = $(hostname) ] && continue 1.22 echo "Getting backups from $i ..." 1.23 rsync -aH -e "$SSH" --bwlimit=50 $REMOTE_USER@$i.slitaz.org:/home/backups/$i/. ../$i/. 1.24 done
2.1 --- a/mirror-tools/rootfs/usr/bin/mkpkgiso Fri May 18 15:57:37 2018 +0200 2.2 +++ b/mirror-tools/rootfs/usr/bin/mkpkgiso Tue Feb 26 08:23:49 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 repos in $@ ; do 2.10 for i in $repos/* ; do 2.11 grep -qs '\[paths]' $i/.hg/hgrc || continue 2.12 @@ -147,7 +147,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 @@ -357,7 +357,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-tools/rootfs/usr/sbin/srvwatch Fri May 18 15:57:37 2018 +0200 3.2 +++ b/mirror-tools/rootfs/usr/sbin/srvwatch Tue Feb 26 08:23:49 2019 +0100 3.3 @@ -107,7 +107,7 @@ 3.4 log "start daemon $command" 3.5 /etc/init.d/$command start 3.6 } 3.7 - if [ $command == mysql -a ! -e /var/run/mysqld/mysqld.sock ]; then 3.8 + if [ $command = mysql -a ! -e /var/run/mysqld/mysqld.sock ]; then 3.9 log "mysql socket" 3.10 killall mysqld 3.11 killall -9 mysqld 3.12 @@ -156,7 +156,7 @@ 3.13 3.14 case "$1" in 3.15 install) 3.16 - [ $0 == $2/usr/sbin/srvwatch ] || mv $0 $2/usr/sbin/srvwatch 3.17 + [ $0 = $2/usr/sbin/srvwatch ] || mv $0 $2/usr/sbin/srvwatch 3.18 if [ -x $2/usr/sbin/srvwatch ] && ! grep -q /usr/sbin/srvwatch $2/etc/inittab; then 3.19 sed -i 's|^::sysinit.*|&\n::respawn:/usr/sbin/srvwatch loop|' \ 3.20 $2/etc/inittab
4.1 --- a/mirror-tools/rootfs/usr/share/mirror-host/boot/shellinabox.sh Fri May 18 15:57:37 2018 +0200 4.2 +++ b/mirror-tools/rootfs/usr/share/mirror-host/boot/shellinabox.sh Tue Feb 26 08:23:49 2019 +0100 4.3 @@ -64,11 +64,11 @@ 4.4 auth() 4.5 { 4.6 while read host md5 ; do 4.7 - [ "${host#*.}" == "${1#*.}" ] && break 4.8 + [ "${host#*.}" = "${1#*.}" ] && break 4.9 done < $(dirname $exe)/shellinabox.secrets 4.10 echo -n "$host password: " 4.11 read -s -t 30 password || exit 1 4.12 - [ "$(echo $password | md5sum)" == "$md5 -" ] || exit 1 4.13 + [ "$(echo $password | md5sum)" = "$md5 -" ] || exit 1 4.14 echo "" 4.15 } 4.16
5.1 --- a/mirror-tools/rootfs/usr/share/rrd/makegraphs Fri May 18 15:57:37 2018 +0200 5.2 +++ b/mirror-tools/rootfs/usr/share/rrd/makegraphs Tue Feb 26 08:23:49 2019 +0100 5.3 @@ -144,7 +144,7 @@ 5.4 5.5 updatediskgraph() { 5.6 period=$1 5.7 - [ "$period" == "day" ] && maxdisk="$(getmax disk)" 5.8 + [ "$period" = "day" ] && maxdisk="$(getmax disk)" 5.9 info="" 5.10 [ -r $2 ] && 5.11 info="[ $(fdisk -l | grep "^Disk $2:" | \ 5.12 @@ -198,7 +198,7 @@ 5.13 updateifgraph() { 5.14 interface=$1 5.15 period=$2 5.16 - [ "$period" == "day" ] && maxif="$(getmax $interface)" 5.17 + [ "$period" = "day" ] && maxif="$(getmax $interface)" 5.18 rrdtool graph "$rrdgraph/$interface-$period.png" --start -1$period \ 5.19 $rrdgraphargs -t "traffic on $interface graph per $period" \ 5.20 --logarithmic -A -v "Bytes/second" --units=si \ 5.21 @@ -260,7 +260,7 @@ 5.22 local i 5.23 d=$(stat -c %D $1) 5.24 for i in /dev/* ; do 5.25 - [ $(stat -c "%02t%02T" $i) == $d ] || continue 5.26 + [ $(stat -c "%02t%02T" $i) = $d ] || continue 5.27 echo $i 5.28 break 5.29 done
6.1 --- a/mirror-tools/slitaz/mirror/floppies/builder/bootloader Fri May 18 15:57:37 2018 +0200 6.2 +++ b/mirror-tools/slitaz/mirror/floppies/builder/bootloader Tue Feb 26 08:23:49 2019 +0100 6.3 @@ -110,7 +110,7 @@ 6.4 ddq bs=16 count=$syssz >>kernel 6.5 [ $(($syssz % 32)) -ne 0 ] && 6.6 ddq bs=16 of=/dev/null count=$((32 - ($syssz % 32))) 6.7 - if [ $(get $Magic kernel 4) == 1400005704 ]; then 6.8 + if [ $(get $Magic kernel 4) = 1400005704 ]; then 6.9 ddq bs=1 count=200 skip=$((512+$(get 0x20E kernel 2))) \ 6.10 if=kernel | strings | sed q 6.11 len=$(get $RamfsLenOfs kernel 4) 6.12 @@ -379,7 +379,7 @@ 6.13 rm -f $bs 6.14 } 6.15 6.16 -if [ "$FORMAT" == "0" ]; then # unsplitted 6.17 +if [ "$FORMAT" = "0" ]; then # unsplitted 6.18 floppyset > $PREFIX 6.19 PAD=$(( 512 - ($(stat -c %s $PREFIX) % 512) )) 6.20 [ $PAD -ne 512 ] && ddq if=/dev/zero bs=1 count=$PAD >> $PREFIX
7.1 --- a/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh Fri May 18 15:57:37 2018 +0200 7.2 +++ b/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh Tue Feb 26 08:23:49 2019 +0100 7.3 @@ -45,7 +45,7 @@ 7.4 awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies: 7.5 <tt>fd001.img</tt> to <tt>$(ls -r fd${i}* | sed q)</tt>.<br> 7.6 $flavor provides $(while read f d; do 7.7 - [ $f == $flavor ] && echo $d; done <<EOT 7.8 + [ $f = $flavor ] && echo $d; done <<EOT 7.9 base the minimum SliTaz distribution subset in text mode 7.10 justx the minimum SliTaz distribution subset with X11 support 7.11 gtkonly the minimum SliTaz distribution subset with GTK+ support
8.1 --- a/slitaz-release/slitaz-release Fri May 18 15:57:37 2018 +0200 8.2 +++ b/slitaz-release/slitaz-release Tue Feb 26 08:23:49 2019 +0100 8.3 @@ -112,7 +112,7 @@ 8.4 check_string "cooking wok is not yet ready to be copied" 8.5 8.6 # Ready for --now ? 8.7 - if [ "$now" ] && [ "$ready" == 0 ]; then 8.8 + if [ "$now" ] && [ "$ready" = 0 ]; then 8.9 echo "Releasing SliTaz: $version" 8.10 cd ${repos}/wok-stable; hg up 8.11 previous_release=$(hg parents --template '{latesttag}') 8.12 @@ -169,7 +169,7 @@ 8.13 check_string "the wok should be tagged to $version" 8.14 echo "" 8.15 8.16 - if [ "$ready" == 0 ]; then 8.17 + if [ "$ready" = 0 ]; then 8.18 echo "Ready to release SliTaz $version :-)" 8.19 else 8.20 echo "Not yet ready to release SliTaz $version"
9.1 --- a/tazpkg-web/search.cgi Fri May 18 15:57:37 2018 +0200 9.2 +++ b/tazpkg-web/search.cgi Tue Feb 26 08:23:49 2019 +0100 9.3 @@ -25,7 +25,7 @@ 9.4 SLITAZ_VERSION=cooking 9.5 case "$(echo $i | tr [A-Z] [a-z])" in 9.6 query=*|search=*) 9.7 - [ ${i#*=} == Search ] || SEARCH=${i#*=};; 9.8 + [ ${i#*=} = Search ] || SEARCH=${i#*=};; 9.9 object=*) 9.10 OBJECT=${i#*=};; 9.11 verbose=*) 9.12 @@ -69,7 +69,7 @@ 9.13 esac 9.14 done 9.15 [ -n "$SEARCH" ] && REQUEST_METHOD="POST" 9.16 - [ "$SEARCH" == "." ] && SEARCH= 9.17 + [ "$SEARCH" = "." ] && SEARCH= 9.18 fi 9.19 9.20 case "$OBJECT" in
10.1 --- a/tazpkg-web/tazpkg-web Fri May 18 15:57:37 2018 +0200 10.2 +++ b/tazpkg-web/tazpkg-web Tue Feb 26 08:23:49 2019 +0100 10.3 @@ -28,7 +28,7 @@ 10.4 # to select the correct one. 10.5 search_form_option() 10.6 { 10.7 - if [ "$RELEASE" == "stable" ]; then 10.8 + if [ "$RELEASE" = "stable" ]; then 10.9 cat << _EOT_ 10.10 <option>stable</option> 10.11 <option>cooking</option>
11.1 --- a/taztpd/taztpd Fri May 18 15:57:37 2018 +0200 11.2 +++ b/taztpd/taztpd Tue Feb 26 08:23:49 2019 +0100 11.3 @@ -97,7 +97,7 @@ 11.4 read request 11.5 while /bin/true; do 11.6 read header 11.7 - [ "$header" == $'\r' ] && break; 11.8 + [ "$header" = $'\r' ] && break; 11.9 done 11.10 # Extract URL from the request string 11.11 url="${request#GET }"
12.1 --- a/tazwikiss/rootfs/var/www/wiki/index.sh Fri May 18 15:57:37 2018 +0200 12.2 +++ b/tazwikiss/rootfs/var/www/wiki/index.sh Tue Feb 26 08:23:49 2019 +0100 12.3 @@ -46,7 +46,7 @@ 12.4 { 12.5 local tmp 12.6 tmp="$(echo $1$(date +%d) | md5sum | cut -c1-8)" 12.7 - [ "$(POST sc)" == "$1" ] && AUTH=$tmp || [ "$AUTH" == "$tmp" ] 12.8 + [ "$(POST sc)" = "$1" ] && AUTH=$tmp || [ "$AUTH" = "$tmp" ] 12.9 } 12.10 12.11 authentified() 12.12 @@ -76,7 +76,7 @@ 12.13 grep -q "^$name()" $i || continue 12.14 . $i 12.15 eval $name "$@" 12.16 - [ $? == 0 ] && status=true 12.17 + [ $? = 0 ] && status=true 12.18 done 2> /tmp/tazwiki$$stderr 12.19 [ -s /tmp/tazwiki$$stderr ] && 12.20 logger -t "httpd/wiki/plugin" < /tmp/tazwiki$$stderr 12.21 @@ -153,7 +153,7 @@ 12.22 CONTENT="$(cat "$PAGE_txt")" 12.23 fi 12.24 # Restaurer une page 12.25 - [ -n "$(GET page)" -a -n "$gtime" -a "$(GET restore)" == 1 ] && 12.26 + [ -n "$(GET page)" -a -n "$gtime" -a "$(GET restore)" = 1 ] && 12.27 [ -r "$BACKUP_DIR$PAGE_TITLE/$gtime" ] && 12.28 CONTENT="$(cat $BACKUP_DIR$PAGE_TITLE/$gtime)" 12.29 CONTENT="$(sed -e 's/\$/\$/g' -e 's/\\/\\/g' <<EOT 12.30 @@ -464,9 +464,9 @@ 12.31 12.32 # Remplacement dans le template 12.33 RECENT="<a href=\"$urlbase?action=recent\" accesskey=\"3\">$RECENT_CHANGES</a>" 12.34 -[ "$action" == "recent" ] && RECENT=$RECENT_CHANGES 12.35 +[ "$action" = "recent" ] && RECENT=$RECENT_CHANGES 12.36 HOME="<a href=\"$urlbase?page=$START_PAGE\" accesskey=\"1\">$HOME_BUTTON</a>" 12.37 -[ "$PAGE_TITLE" == "$START_PAGE" -a "$action" != "search" ] && HOME=$HOME_BUTTON 12.38 +[ "$PAGE_TITLE" = "$START_PAGE" -a "$action" != "search" ] && HOME=$HOME_BUTTON 12.39 HELP="\1<a href=\"$urlbase?page=$HELP_BUTTON\" accesskey=\"2\" rel=\"nofollow\">$HELP_BUTTON</a>\2" 12.40 [ "$action" != "edit" ] && HELP="" 12.41
13.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Admin.sh Fri May 18 15:57:37 2018 +0200 13.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Admin.sh Tue Feb 26 08:23:49 2019 +0100 13.3 @@ -46,7 +46,7 @@ 13.4 secret="admin.secret" 13.5 if [ -n "$(POST setpass)" ]; then 13.6 if [ -z "$curpass" ]; then # unauthorized 13.7 - if [ ! -s $secret -o "$(cat $secret 2> /dev/null)" == \ 13.8 + if [ ! -s $secret -o "$(cat $secret 2> /dev/null)" = \ 13.9 "$(echo $(POST password) | md5sum)" ]; then 13.10 curpass="$(POST password)" 13.11 fi
14.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Password.sh Fri May 18 15:57:37 2018 +0200 14.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Password.sh Tue Feb 26 08:23:49 2019 +0100 14.3 @@ -15,7 +15,7 @@ 14.4 esac 14.5 hash="$(sed '/{HASHPASSWORD=.*}/!d;s/.*{HASHPASSWORD=\([^}]*\)}.*/\1/;q' <$1)" 14.6 cookie="pagepass$(pagepass_hash $PWD$PAGE_txt)" 14.7 - [ "$(COOKIE $cookie)" == "$hash" ] && return 14.8 + [ "$(COOKIE $cookie)" = "$hash" ] && return 14.9 header 14.10 echo "<script> history.go(-1); </script>" 14.11 exit 0 14.12 @@ -24,9 +24,9 @@ 14.13 14.14 action() 14.15 { 14.16 - [ "$1" == "pagepass" ] || return 1 14.17 + [ "$1" = "pagepass" ] || return 1 14.18 uri="$SCRIPT_NAME?page=$(POST page)&auth=$(POST auth)" 14.19 - if [ "$(pagepass_hash $(POST pass))" == "$(POST hash)" ]; then 14.20 + if [ "$(pagepass_hash $(POST pass))" = "$(POST hash)" ]; then 14.21 header "HTTP/1.0 302 Found" \ 14.22 "location: $uri" \ 14.23 "Set-Cookie: $(POST cookie)=$(POST hash)"
15.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Upload.sh Fri May 18 15:57:37 2018 +0200 15.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_Upload.sh Tue Feb 26 08:23:49 2019 +0100 15.3 @@ -63,7 +63,7 @@ 15.4 ls pages/data | while read file; do 15.5 stat -c "%s %n" pages/data/$file 15.6 done | while read size file; do 15.7 - [ $filesize == $size ] && 15.8 + [ $filesize = $size ] && 15.9 cmp $(FILE file tmpname) $file > /dev/null && 15.10 ln -s $(basename $file) pages/data/$n$name && break 15.11 done