diff --git a/modules/convert b/modules/convert index c223cfb..496d1e4 100755 --- a/modules/convert +++ b/modules/convert @@ -755,7 +755,7 @@ convert_tcz() { 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 --git a/modules/get b/modules/get index c82805b..611f0dd 100755 --- a/modules/get +++ b/modules/get @@ -65,9 +65,9 @@ get_cache_path() { 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 @@ get_pkg_cookmode() { # 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 --git a/modules/install b/modules/install index ff07bf2..e67b826 100755 --- a/modules/install +++ b/modules/install @@ -27,7 +27,7 @@ log_pkg() { local extra - [ "$1" == 'Installed' ] && \ + [ "$1" = 'Installed' ] && \ extra=" - $(fgrep " $PACKAGE-$VERSION" "$PKGS_DB/installed.$SUM" | awk '{print $1}')" debug " extra='$extra'" @@ -150,7 +150,7 @@ install_all_deps() { "$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 @@ install_all_deps() { # 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 @@ install_all_deps() { # 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 @@ EOT # 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 @@ EOT 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 --git a/modules/recharge b/modules/recharge index 1598bb9..ffada96 100755 --- a/modules/recharge +++ b/modules/recharge @@ -81,7 +81,7 @@ for path in $repo_to_recharge; do 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 --git a/modules/upgrade b/modules/upgrade index fa6aab1..faf8753 100755 --- a/modules/upgrade +++ b/modules/upgrade @@ -28,7 +28,7 @@ tmp_up_list=$(mktemp) 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 --git a/tazpanel/pkgs.cgi b/tazpanel/pkgs.cgi index ec41f48..36d199e 100644 --- a/tazpanel/pkgs.cgi +++ b/tazpanel/pkgs.cgi @@ -92,7 +92,7 @@ case " $(GET) " in # 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 @@ case " $(GET) " in 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 @@ show_button() { *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 @@ show_list() { 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_package_link() { 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 @@ EOT [ ! -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:')