# HG changeset patch # User Pascal Bellard # Date 1551165754 -3600 # Node ID 061a079077a3140dfe99cc526a667341ff79be94 # Parent ccbd176f0619ca2a8222b0041cd995f8a2ee1148 Remove ashism == diff -r ccbd176f0619 -r 061a079077a3 chub/web/lib/makegraphs --- a/chub/web/lib/makegraphs Mon Oct 08 23:27:48 2018 +0300 +++ b/chub/web/lib/makegraphs Tue Feb 26 08:22:34 2019 +0100 @@ -153,7 +153,7 @@ updatediskgraph() { period=$1 - [ "$period" == "day" ] && maxdisk="$(getmax disk)" + [ "$period" = "day" ] && maxdisk="$(getmax disk)" info="" [ -r $2 ] && info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \ @@ -289,7 +289,7 @@ local i d=$(stat -c %04D $1) for i in /dev/* ; do - [ $(stat -c "%02t%02T" $i) == $d ] || continue + [ $(stat -c "%02t%02T" $i) = $d ] || continue echo $i break done diff -r ccbd176f0619 -r 061a079077a3 dvd/mkpkgiso --- a/dvd/mkpkgiso Mon Oct 08 23:27:48 2018 +0300 +++ b/dvd/mkpkgiso Tue Feb 26 08:22:34 2019 +0100 @@ -50,7 +50,7 @@ fi # Update hg repos -if [ "$PKG_VER" == "update-hg" ]; then +if [ "$PKG_VER" = "update-hg" ]; then for i in $1/* ; do grep -qs '\[paths]' $i/.hg/hgrc || continue cd $i @@ -124,7 +124,7 @@ DIR=\$(cd \$(busybox dirname \$0); pwd) # Handle --auto-install case -if [ "\$DIR" == "/etc/init.d" ]; then +if [ "\$DIR" = "/etc/init.d" ]; then DIR=/cdrom if [ ! -f /cdrom/install.sh ]; then mkdir /cdrom 2> /dev/null @@ -325,7 +325,7 @@ need $iso which isoinfo > /dev/null || need /usr/bin/isoinfo isoinfo -R -l -i $iso | awk '/^Directory/ { path=$4 } /^-/ { print path$12 }' | while read file; do - [ "$(basename $file)" == ".." ] && continue + [ "$(basename $file)" = ".." ] && continue [ "$file" = "/boot/isolinux/boot.cat" ] && continue [ -d "$(dirname $TEMP_DIR/$file)" ] || mkdir -p "$(dirname $TEMP_DIR/$file)" diff -r ccbd176f0619 -r 061a079077a3 mirror/floppies/mkfdrolling.sh --- a/mirror/floppies/mkfdrolling.sh Mon Oct 08 23:27:48 2018 +0300 +++ b/mirror/floppies/mkfdrolling.sh Tue Feb 26 08:22:34 2019 +0100 @@ -45,7 +45,7 @@ awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies: fd001.img to $(ls -r fd${i}* | sed q).
$flavor provides $(while read f d; do - [ $f == $flavor ] && echo $d; done <$(gettext description)" [ -f $WOK/$pkg/description.txt ] || DESC="" - [ "$CATEGORY" == "$SEARCH" ] && cat << _EOT_ + [ "$CATEGORY" = "$SEARCH" ] && cat << _EOT_ $(package_entry)$DESC _EOT_ done @@ -964,7 +964,7 @@ . $WOK/$pkg/receipt DESC=" $(gettext description)" [ -f $WOK/$pkg/description.txt ] || DESC="" - [ "$MAINTAINER" == "$SEARCH" ] && cat << _EOT_ + [ "$MAINTAINER" = "$SEARCH" ] && cat << _EOT_ $(package_entry)$DESC _EOT_ done diff -r ccbd176f0619 -r 061a079077a3 pkgs/search.sh --- a/pkgs/search.sh Mon Oct 08 23:27:48 2018 +0300 +++ b/pkgs/search.sh Tue Feb 26 08:22:34 2019 +0100 @@ -76,7 +76,7 @@ nice_url() { # if user submitted a form - if [ "$REQUEST_METHOD" == 'POST' -o -n "$(GET submit)" ]; then + if [ "$REQUEST_METHOD" = 'POST' -o -n "$(GET submit)" ]; then OBJECT="$(GETPOST object)" SEARCH="$(GETPOST query)" case $OBJECT in @@ -120,7 +120,7 @@ # debug, if needed debugq="$(GET debug)" - if [ -n "$debugq" -a "$debugq" == 'debug' ]; then + if [ -n "$debugq" -a "$debugq" = 'debug' ]; then NICE="$NICE&debug" fi @@ -181,7 +181,7 @@ s='selected' for i in $(echo $QUERY_STRING | sed 's/[?&]/ /g'); do case "$(echo $i | tr [A-Z] [a-z])" in - query=*|search=*) [ ${i#*=} == Search ] || SEARCH=${i#*=};; + query=*|search=*) [ ${i#*=} = Search ] || SEARCH=${i#*=};; object=*) OBJECT=${i#*=};; verbose=*) VERBOSE=${i#*=};; lang=*) LANG=${i#*=};; @@ -228,7 +228,7 @@ SEARCH="$(echo $SEARCH | sed 's|%2B|+|g; s|%3A|:|g; s|%2F|/|g')" SLITAZ_HOME="/home/slitaz" -if [ "$SLITAZ_VERSION" == 'cooking' ]; then +if [ "$SLITAZ_VERSION" = 'cooking' ]; then WOK="$SLITAZ_HOME/wok" else WOK="$SLITAZ_HOME/wok-$SLITAZ_VERSION" @@ -942,7 +942,7 @@ # page begins # -if [ -n "$HTTP_IF_MODIFIED_SINCE" -a "$HTTP_IF_MODIFIED_SINCE" == "$lastmod" ]; then +if [ -n "$HTTP_IF_MODIFIED_SINCE" -a "$HTTP_IF_MODIFIED_SINCE" = "$lastmod" ]; then # When user agent asks if content modified since last seen and it is not modified header "HTTP/1.1 304 Not Modified" exit 0 @@ -984,7 +984,7 @@ esac echo -n "" done echo '' diff -r ccbd176f0619 -r 061a079077a3 roadmap/roadmap.cgi --- a/roadmap/roadmap.cgi Mon Oct 08 23:27:48 2018 +0300 +++ b/roadmap/roadmap.cgi Tue Feb 26 08:22:34 2019 +0100 @@ -36,13 +36,13 @@ for task in $(fgrep -H "$1" $taskdir/*.conf | cut -d ":" -f 1) do . $task - if [ "$PRIORITY" == "$pr" ]; then + if [ "$PRIORITY" = "$pr" ]; then show_task fi done done - [ "$1" == "TODO" ] && [ "$todo" == "0" ] && echo "All done." - [ "$1" == "DONE" ] && [ "$done" == "0" ] && echo "Nothing done." + [ "$1" = "TODO" ] && [ "$todo" = "0" ] && echo "All done." + [ "$1" = "DONE" ] && [ "$done" = "0" ] && echo "Nothing done." } # xHTML header. diff -r ccbd176f0619 -r 061a079077a3 scn/plugins/mybugs/user.sh --- a/scn/plugins/mybugs/user.sh Mon Oct 08 23:27:48 2018 +0300 +++ b/scn/plugins/mybugs/user.sh Tue Feb 26 08:22:34 2019 +0100 @@ -48,7 +48,7 @@ if [ "$show_more" ]; then echo "

" - if [ "$HTTP_HOST" == "bugs.slitaz.org" ]; then + if [ "$HTTP_HOST" = "bugs.slitaz.org" ]; then echo "$(gettext 'View all my bugs and messages')" else echo "$(gettext 'View all my bugs and debug messages on:') " diff -r ccbd176f0619 -r 061a079077a3 tank/tank --- a/tank/tank Mon Oct 08 23:27:48 2018 +0300 +++ b/tank/tank Tue Feb 26 08:22:34 2019 +0100 @@ -48,13 +48,13 @@ # Update Tank web interface echo -e "\nUpdating: tank.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u rm -rf $VHOST/*.* $VHOST/images cp -a tank/web/* $VHOST # Be sure we have last version of libtaz.sh httphelper.sh #echo "$(colorize 33 'Updating:') libtaz.sh && httphelper.sh" #cd $REPOS/slitaz-base-files - #[ "$2" == "--nohg" ] || hg pull -u + #[ "$2" = "--nohg" ] || hg pull -u #cp -f rootfs/lib/libtaz.sh /lib #cp -f rootfs/usr/lib/slitaz/httphelper.sh /usr/lib/slitaz echo "" ;; @@ -63,7 +63,7 @@ # Update People web interface echo -e "\nUpdating: people.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u rm -rf $WWW/people/* cp -a people/* $WWW/people echo "" ;; @@ -72,7 +72,7 @@ # Update Pro website echo -e "\nUpdating: pro.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u rm -rf $WWW/pro/web/* cp -a pro/* $WWW/pro/web echo "" ;; @@ -81,7 +81,7 @@ # Update Web Boot interface echo -e "\nUpdating: boot.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u rm -rf $WWW/boot/* cp -a boot/* $WWW/boot echo "" ;; @@ -90,9 +90,9 @@ # Update Web Boot interface echo -e "\nUpdating: cook.slitaz.org..." cd $REPOS/cookutils - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u cp -a cook/* $WWW/cook # We use symlinks for cooker's cd $WWW/cook && rm -f style.css @@ -124,7 +124,7 @@ # Update Roadmap Web interface echo -e "\nUpdating: roadmap.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u cp -a roadmap/* $WWW/roadmap echo "" ;; @@ -133,7 +133,7 @@ bugs="$WWW/bugs" echo -e "\nUpdating: bugs.slitaz.org..." cd $REPOS/tazbug - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u cp -a web/* ${bugs} cp README ${bugs} chown -R www.www ${bugs} @@ -143,7 +143,7 @@ # Update IRC interface echo -e "\nUpdating: irc.slitaz.org..." cd $REPOS/slitaz-forge - [ "$2" == "--nohg" ] || hg pull -u + [ "$2" = "--nohg" ] || hg pull -u rm -rf $WWW/irc/images $WWW/irc/lib cp -a irc/* $WWW/irc echo "" ;; diff -r ccbd176f0619 -r 061a079077a3 tank/web/lib/chkpkgs --- a/tank/web/lib/chkpkgs Mon Oct 08 23:27:48 2018 +0300 +++ b/tank/web/lib/chkpkgs Tue Feb 26 08:22:34 2019 +0100 @@ -10,7 +10,7 @@ VERSION= EXTRAVERSION= . $j - [ "$i" == "$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ] && continue 2 + [ "$i" = "$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ] && continue 2 done echo "Rebuild $i" done diff -r ccbd176f0619 -r 061a079077a3 tank/web/lib/makegraphs --- a/tank/web/lib/makegraphs Mon Oct 08 23:27:48 2018 +0300 +++ b/tank/web/lib/makegraphs Tue Feb 26 08:22:34 2019 +0100 @@ -159,7 +159,7 @@ updatediskgraph() { period=$1 - [ "$period" == "day" ] && maxdisk="$(getmax disk)" + [ "$period" = "day" ] && maxdisk="$(getmax disk)" info="" [ -r $2 ] && info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \ @@ -337,7 +337,7 @@ local i d=$(stat -c %04D $1) for i in /dev/* ; do - [ $(stat -c "%02t%02T" $i) == $d ] || continue + [ $(stat -c "%02t%02T" $i) = $d ] || continue echo $i return done diff -r ccbd176f0619 -r 061a079077a3 usbkey/helper.sh --- a/usbkey/helper.sh Mon Oct 08 23:27:48 2018 +0300 +++ b/usbkey/helper.sh Tue Feb 26 08:22:34 2019 +0100 @@ -1,6 +1,6 @@ #!/bin/sh -if [ "$1" == "--stats" ]; then +if [ "$1" = "--stats" ]; then dir=$(dirname $0)/$2 if [ -n "$3" ]; then sed 's/.*"\([0-9]* Gb\)".*/\1/' $dir/?/* | sort | awk '{