tazinst rev 98

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 08:29:08 2019 +0100 (2019-02-26)
parents 46b92b7cac65
children d41f08c53b3e
files installer.cgi slitaz-installer tazinst
line diff
     1.1 --- a/installer.cgi	Thu Nov 22 17:26:52 2018 +0100
     1.2 +++ b/installer.cgi	Tue Feb 26 08:29:08 2019 +0100
     1.3 @@ -285,7 +285,7 @@
     1.4  		"$media" \
     1.5  		"$(_ 'Select a SliTaz ISO file located on a local disk')"
     1.6  	error="$?"
     1.7 -	if [ "$media" == "iso" ]; then
     1.8 +	if [ "$media" = "iso" ]; then
     1.9  		input "text" \
    1.10  			"src_iso" \
    1.11  			"$source" "" \
    1.12 @@ -313,7 +313,7 @@
    1.13  		"$(_ 'Select a SliTaz version on the Web')"
    1.14  	error="$?"
    1.15  
    1.16 -	if [ "$media" == "web" ]; then
    1.17 +	if [ "$media" = "web" ]; then
    1.18  		input "text" \
    1.19  			"src_web" \
    1.20  			"$source" "" \
    1.21 @@ -338,7 +338,7 @@
    1.22  	local root_uuid="$(/usr/sbin/tazinst get root_uuid "$INSTFILE")"
    1.23  	local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")"
    1.24  	comment "root_uuid selection"
    1.25 -	if [ "$mode" == "upgrade" ]; then
    1.26 +	if [ "$mode" = "upgrade" ]; then
    1.27  		label "root_uuid" \
    1.28  			"$(_ 'Existing SliTaz partition to upgrade:')" \
    1.29  			"$(_ 'Specify the partition containing the system to upgrade')"
    1.30 @@ -671,7 +671,7 @@
    1.31  	/usr/sbin/tazinst set winboot "$(GET WINBOOT)" "$INSTFILE"
    1.32  
    1.33  	# bootloader
    1.34 -	if [ "$(GET BOOTLOADER)" == "auto" ]; then
    1.35 +	if [ "$(GET BOOTLOADER)" = "auto" ]; then
    1.36  		/usr/sbin/tazinst set bootloader "auto" "$INSTFILE"
    1.37  	else
    1.38  		/usr/sbin/tazinst unset bootloader "$INSTFILE"
    1.39 @@ -970,7 +970,7 @@
    1.40  
    1.41  label_media() {
    1.42  	local id="$1" label="$2" media="$3" title="$4" retcode=0
    1.43 -	if [ "$media" == "$id" ]; then
    1.44 +	if [ "$media" = "$id" ]; then
    1.45  		label "source" \
    1.46  			"$label" \
    1.47  			"$title" \
    1.48 @@ -1033,7 +1033,7 @@
    1.49  	printf '<input type="%s" id="%s" list="list_%s" ' "$type" "$name" "$name"
    1.50  	printf 'name="%s" class="%s" ' "$(printf $name | tr [a-z] [A-Z])" "$type"
    1.51  	[ "$value" ] && printf 'value="%s" ' "$value"
    1.52 -	[ "$value" == "$selected" ] && printf '%s' "checked "
    1.53 +	[ "$value" = "$selected" ] && printf '%s' "checked "
    1.54  	[ "$action" ] && printf \
    1.55  		'onInput="document.getElementById(%s).checked = true;" ' "'$action'"
    1.56  	[ "$help" ] && printf 'placeholder="%s" />\n' "$help" || echo "/>"
    1.57 @@ -1043,7 +1043,7 @@
    1.58  {
    1.59  	local id="$1" media="$2"
    1.60  	printf '<input type="radio" name="MEDIA" value="%s" id="%s" ' "$id" "$id"
    1.61 -	[ "$media" == "$id" ] && echo 'checked />' || echo '/>'
    1.62 +	[ "$media" = "$id" ] && echo 'checked />' || echo '/>'
    1.63  }
    1.64  
    1.65  input_hidden()
     2.1 --- a/slitaz-installer	Thu Nov 22 17:26:52 2018 +0100
     2.2 +++ b/slitaz-installer	Tue Feb 26 08:29:08 2019 +0100
     2.3 @@ -172,7 +172,7 @@
     2.4  		esac ;;
     2.5  	root_uuid)
     2.6  		local mode="$(tazinst get mode)"
     2.7 -		if [ "$mode" == 'upgrade' ]; then printf "$ROOT_UUID_UPGRADE_MSG";
     2.8 +		if [ "$mode" = 'upgrade' ]; then printf "$ROOT_UUID_UPGRADE_MSG";
     2.9  			else printf "$ROOT_UUID_DEFAULT_MSG"; fi ;;
    2.10  	root_format|home_format)
    2.11  		printf "$ROOT_FORMAT_MSG" ;;
     3.1 --- a/tazinst	Thu Nov 22 17:26:52 2018 +0100
     3.2 +++ b/tazinst	Tue Feb 26 08:29:08 2019 +0100
     3.3 @@ -85,7 +85,7 @@
     3.4  
     3.5  # predefined iso (key:url:help)
     3.6  SLITAZ_VERSION="${SLITAZ_VERSION:-cooking}"
     3.7 -[ "$SLITAZ_VERSION" == 'cooking' ] && SLITAZ_VERSION="$(($(date "+%y")-8)).0"
     3.8 +[ "$SLITAZ_VERSION" = 'cooking' ] && SLITAZ_VERSION="$(($(date "+%y")-8)).0"
     3.9  [ -n "$URL_ISO" ] && readonly LST_WEB="$URL_ISO" || readonly LST_WEB="
    3.10  stable:iso/stable/slitaz-$SLITAZ_VERSION.iso \
    3.11  :$(_ 'Stable release') $SLITAZ_VERSION
    3.12 @@ -495,7 +495,7 @@
    3.13  {
    3.14  	local setting="$1" value="$(get $1)" found=0 partition msg
    3.15  	for partition in $(list_uuid); do
    3.16 -		[ "$partition" == "$value" ] && found="$(($found + 1))"
    3.17 +		[ "$partition" = "$value" ] && found="$(($found + 1))"
    3.18  	done
    3.19  	if [ "$found" != "1" ]; then
    3.20  		msg="$(gettext "$setting")=$value
    3.21 @@ -619,7 +619,7 @@
    3.22  	local pt_list="gpt msdos"
    3.23  	# get root uuid
    3.24  	local uuid="$(get root_uuid)"
    3.25 -	if [ "$(/sbin/blkid | grep -c "$uuid")" == "1" ]; then
    3.26 +	if [ "$(/sbin/blkid | grep -c "$uuid")" = "1" ]; then
    3.27  		if ! printf "%s" "$(p_table $uuid)" | \
    3.28  				egrep -q "$(regex "$pt_list")"; then
    3.29  			_ 'Error: Unsupported Partition Table.' 1>&2
    3.30 @@ -1409,7 +1409,7 @@
    3.31  	mount -t "$mount_fs" "$ROOT_UUID" \
    3.32  			"$TARGET_ROOT" >>"$LOG" 2>>"$LOG"
    3.33  	if [ $(mount | \
    3.34 -			grep -c "mnt/target") == "0" ]; then
    3.35 +			grep -c "mnt/target") = "0" ]; then
    3.36  		error 4 "$(_ '%s: Unable to mount partition' "$ROOT_UUID")"
    3.37  	fi
    3.38  }
    3.39 @@ -1439,7 +1439,7 @@
    3.40  	fi
    3.41  
    3.42  	# eject cd
    3.43 -	if [ "$SOURCE" == "cdrom" ]; then
    3.44 +	if [ "$SOURCE" = "cdrom" ]; then
    3.45  		_ 'Ejecting CD-ROM...'
    3.46  		eject
    3.47  	fi
    3.48 @@ -1471,12 +1471,12 @@
    3.49  # selection
    3.50  bootloader()
    3.51  {
    3.52 -	if [ "$BOOTLOADER" == "auto" ]; then
    3.53 +	if [ "$BOOTLOADER" = "auto" ]; then
    3.54  		# use syslinux, but if p_table=msdos take grub (if available)
    3.55  		unset BOOTLOADER
    3.56  		printf "%s" "$(list_bootloader)" | \
    3.57  			grep -q "syslinux" && BOOTLOADER=syslinux
    3.58 -		if [ "$(p_table $ROOT_UUID)" == "msdos" ]; then
    3.59 +		if [ "$(p_table $ROOT_UUID)" = "msdos" ]; then
    3.60  			printf "%s" "$(list_bootloader)" | \
    3.61  				grep -q " grub" && BOOTLOADER=grub
    3.62  		fi
    3.63 @@ -2123,7 +2123,7 @@
    3.64  
    3.65  	# install packages.
    3.66  	log "$(_ 'Installing packages...')"
    3.67 -	if [ "$packages" == "0" ]; then
    3.68 +	if [ "$packages" = "0" ]; then
    3.69  		log "$(_ 'packages to install: 0')"
    3.70  	else
    3.71  		# get-install all missing pkgs.