From f46f81c5a777d1c459031333f813db7bd944ce57 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 28 Mar 2022 21:46:14 +0200 Subject: [PATCH] replace -z with shell replacement --- usr/bin/archboot-update-installer.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index d49df8ea2..0e700a293 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -27,8 +27,8 @@ kver() { zram_mount() { # add defaults - [[ -z "${_ZRAM_ALGORITHM}" ]] && _ZRAM_ALGORITHM="zstd" - [[ -z "${_ZRAM_MAX_COMP_STREAMS}" ]] && _ZRAM_MAX_COMP_STREAMS="4" + _ZRAM_ALGORITHM=${_ZRAM_ALGORITHM:-"zstd"} + _ZRAM_MAX_COMP_STREAMS=${_ZRAM_MAX_COMP_STREAMS:-"4"} modprobe zram echo "${_ZRAM_ALGORITHM}" >/sys/block/zram0/comp_algorithm echo "${1}" >/sys/block/zram0/disksize @@ -137,7 +137,7 @@ if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then exit 1 fi touch /.update-installer - [[ -z "${_ZRAM_SIZE}" ]] && _ZRAM_SIZE="3G" + _ZRAM_SIZE=${_ZRAM_SIZE:-"3G"} zram_mount "${_ZRAM_SIZE}" echo -e "\033[1mStep 1/9:\033[0m Removing not necessary files from / ..." clean_archboot @@ -226,7 +226,7 @@ fi # Generate new images if [[ "${_G_RELEASE}" == "1" ]]; then - [[ -z "${_ZRAM_IMAGE_SIZE}" ]] && _ZRAM_IMAGE_SIZE="5G" + _ZRAM_IMAGE_SIZE=${_ZRAM_IMAGE_SIZE:-"5G"} zram_mount "${_ZRAM_IMAGE_SIZE}" echo -e "\033[1mStep 1/2:\033[0m Removing not necessary files from / ..." clean_archboot