# HG changeset patch # User Pascal Bellard # Date 1551165682 -3600 # Node ID 9d683c983e2e5e8af022124957442d258b811d52 # Parent d2dc3d5ed06de0ce82976d8e30c81a74d173d5e4 Remove ashism == diff -r d2dc3d5ed06d -r 9d683c983e2e modules/convert --- a/modules/convert Mon Nov 26 20:27:56 2018 +0200 +++ b/modules/convert Tue Feb 26 08:21:22 2019 +0100 @@ -755,7 +755,7 @@ PACKAGE_FILE="$(realpath "$PACKAGE_FILE")" debug "PACKAGE_FILE='$PACKAGE_FILE'" -if [ "$(dd if="$PACKAGE_FILE" bs=8 count=1 skip=1 2>/dev/null)" == 'debian-b' ]; then +if [ "$(dd if="$PACKAGE_FILE" bs=8 count=1 skip=1 2>/dev/null)" = 'debian-b' ]; then convert_deb else case "$PACKAGE_FILE" in diff -r d2dc3d5ed06d -r 9d683c983e2e modules/get --- a/modules/get Mon Nov 26 20:27:56 2018 +0200 +++ b/modules/get Tue Feb 26 08:21:22 2019 +0100 @@ -65,9 +65,9 @@ local cache_dir - if [ "$2" == 'extra' ]; then + if [ "$2" = 'extra' ]; then cache_dir="$SAVE_CACHE_DIR/extra/packages" - elif [ "$1" == "$PKGS_DB" ]; then + elif [ "$1" = "$PKGS_DB" ]; then # Main repository cache_dir="$SAVE_CACHE_DIR/$SLITAZ_RELEASE/packages" else @@ -487,7 +487,7 @@ # Command 'get-install' calls 'get', then 'install' modules. Check package presence here, on the # first stage, if '--forced' option not given -if [ "$tazpkg_command" == 'get-install' ]; then +if [ "$tazpkg_command" = 'get-install' ]; then if grep -qs "^$1$" "$BLOCKED"; then _ 'Package "%s" blocked.' "$1" >&2 exit 1 diff -r d2dc3d5ed06d -r 9d683c983e2e modules/install --- a/modules/install Mon Nov 26 20:27:56 2018 +0200 +++ b/modules/install Tue Feb 26 08:21:22 2019 +0100 @@ -27,7 +27,7 @@ local extra - [ "$1" == 'Installed' ] && \ + [ "$1" = 'Installed' ] && \ extra=" - $(fgrep " $PACKAGE-$VERSION" "$PKGS_DB/installed.$SUM" | awk '{print $1}')" debug " extra='$extra'" @@ -150,7 +150,7 @@ "$num")" - if [ "$AUTO_INSTALL_DEPS" == 'yes' ] || [ -n "$quiet" ]; then + if [ "$AUTO_INSTALL_DEPS" = 'yes' ] || [ -n "$quiet" ]; then # Quietly not displaying anything. Assume 'yes' unless '--noconfirm' is provided answer=0 [ -n "$noconfirm" ] && answer=1 @@ -168,7 +168,7 @@ # We can install packages from /home/boot/packages at boot time # Also we can prefer local packages over mirrored/cached using '--local' option - [ "$dir" == '/home/boot/packages' ] && local='yes' + [ "$dir" = '/home/boot/packages' ] && local='yes' debug " local='$local'" # "--nodeps" option prevents to install dependencies @@ -219,7 +219,7 @@ # Extract receipt from each matched package cpio -F "$pkgfile" -i receipt >/dev/null 2>&1 name=$(. ./receipt; echo $PACKAGE) - [ "$name" == "$pkg" ] && found='1' && break + [ "$name" = "$pkg" ] && found='1' && break # Install the first matched package: normally there is only one package # with the $PACKAGE matched in the receipt rm receipt @@ -399,7 +399,7 @@ # Special mode for using in cookutils: clearly show whether freshly used package or cached one if [ -n "$cookmode" ]; then f=${PACKAGE_FILE%/*}; f=${f%/*}; f=${f##*/} - if [ "$f" == "$(cat /etc/slitaz-release)" ]; then + if [ "$f" = "$(cat /etc/slitaz-release)" ]; then _ 'Installing (web/cache): %s' "$(basename $PACKAGE_FILE .tazpkg)" else _ 'Installing (pkg/local): %s' "$(basename $PACKAGE_FILE .tazpkg)" @@ -460,7 +460,7 @@ done ; $check && \ for i in *; do - [ "$i" == "$PACKAGE" ] && continue + [ "$i" = "$PACKAGE" ] && continue [ -s "$i/files.list" ] || continue awk "{ printf \"$i %s\\n\",\$1 }" < "$i/files.list" done; diff -r d2dc3d5ed06d -r 9d683c983e2e modules/recharge --- a/modules/recharge Mon Nov 26 20:27:56 2018 +0200 +++ b/modules/recharge Tue Feb 26 08:21:22 2019 +0100 @@ -81,7 +81,7 @@ mirror=$(cat mirror); mirror="${mirror%/}/" # Repository name - if [ "$path" == "$PKGS_DB" ]; then + if [ "$path" = "$PKGS_DB" ]; then repo_name='Main' else repo_name="$(_n 'Undigest %s' "$(basename "$path")")" diff -r d2dc3d5ed06d -r 9d683c983e2e modules/upgrade --- a/modules/upgrade Mon Nov 26 20:27:56 2018 +0200 +++ b/modules/upgrade Tue Feb 26 08:21:22 2019 +0100 @@ -28,7 +28,7 @@ repo_number=1 for repo in $PRIORITY; do - if [ "$repo" == "$PKGS_DB" ]; then + if [ "$repo" = "$PKGS_DB" ]; then repo_name='Main' else repo_name="$(basename "$repo")" diff -r d2dc3d5ed06d -r 9d683c983e2e tazpanel/pkgs.cgi --- a/tazpanel/pkgs.cgi Mon Nov 26 20:27:56 2018 +0200 +++ b/tazpanel/pkgs.cgi Tue Feb 26 08:21:22 2019 +0100 @@ -92,7 +92,7 @@ # Package not installed data_icon="@pkg@"; responce='n' equivs=$(grep "^$pkg=" "$PKGS_DB/packages.equiv") - if [ "$(GET pkg)" == "$pkg" -a -n "$equivs" ]; then + if [ "$(GET pkg)" = "$pkg" -a -n "$equivs" ]; then # Check equivalent packages for equiv in ${equivs#*=}; do case $equiv in @@ -115,9 +115,9 @@ fi # Installed and blocked? - [ "$data_icon" == "@pkgi@" ] && grep -q "^$pkg$" "$BLOCKED" && data_icon="@pkgib@" + [ "$data_icon" = "@pkgi@" ] && grep -q "^$pkg$" "$BLOCKED" && data_icon="@pkgib@" - if [ $(GET web) == 'y' ]; then + if [ $(GET web) = 'y' ]; then # Request from page http://pkgs.slitaz.org/ for example: # http://127.0.0.1:82/pkgs.cgi?status&web=y&pkg=nano # Allow http://pkgs.slitaz.org/ to get information from tazpanel server @@ -302,7 +302,7 @@ *add-repo) icon="@add@"; label=$(_n 'Add repository');; toggle) icon="@toggle@"; label=$(_n 'Toggle all');; esac - if [ "$button" == 'toggle' ]; then + if [ "$button" = 'toggle' ]; then echo -n "" else echo -n "" @@ -409,8 +409,8 @@ done [ -f "$BLOCKED" ] && cat "$BLOCKED" sed 's|.*|&\ti|' "$PKGS_DB/installed.info" - [ "$cat" == 'extra' ] || [ $1 == 'my' ] || cat "$i/packages.info" - [ "$cat" == 'extra' ] && + [ "$cat" = 'extra' ] || [ $1 = 'my' ] || cat "$i/packages.info" + [ "$cat" = 'extra' ] && sed 's,\([^|]*\)|\([^|]*\)|\([^|]*\)|\([^|]*\)|\([^|]*\).*,\1\t\5\textra\t\2\thttp://mirror.slitaz.org/packages/get/\1\t-\t-\t-\t-,' "$PKGS_DB/extra.list" # Last list entry will miss, so add fake line echo 'zzzzzzzz' @@ -510,7 +510,7 @@ show_info_links() { if [ -n "$1" ]; then - if [ "$3" == 'tag' ]; then icon="@tag@"; else icon="@clock@"; fi + if [ "$3" = 'tag' ]; then icon="@tag@"; else icon="@clock@"; fi case "$4" in provide) echo -n "$2"; noeq=' ';; '') echo -n "$2"; noeq='';; @@ -728,7 +728,7 @@ [ ! -f $PKGS_DB/packages.info ] && msg warn \ "$(_ 'You can not view a list of all packages until recharging lists.')" - [ "$REMOTE_USER" == "root" ] && cat <
$(_ 'Selected packages:')