diff options
Diffstat (limited to 'custom/lib')
| -rw-r--r-- | custom/lib/common.sh | 4 | ||||
| -rw-r--r-- | custom/lib/config.sh | 4 | ||||
| -rw-r--r-- | custom/lib/disk.sh | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/custom/lib/common.sh b/custom/lib/common.sh index a41441d..2f8844e 100644 --- a/custom/lib/common.sh +++ b/custom/lib/common.sh @@ -42,7 +42,9 @@ log() { ############################# require_root() { - [[ $EUID -ne 0 ]] && error "This script must be run as root" + if [[ $EUID -ne 0 ]]; then + error "This script must be run as root" + fi } command_exists() { diff --git a/custom/lib/config.sh b/custom/lib/config.sh index 82f5d77..cec3d8c 100644 --- a/custom/lib/config.sh +++ b/custom/lib/config.sh @@ -122,6 +122,8 @@ validate_config() { ((errors++)) fi - [[ $errors -gt 0 ]] && error "Config validation failed with $errors error(s)" + if [[ $errors -gt 0 ]]; then + error "Config validation failed with $errors error(s)" + fi info "Config validation passed" } diff --git a/custom/lib/disk.sh b/custom/lib/disk.sh index ea8c402..fa3dbd2 100644 --- a/custom/lib/disk.sh +++ b/custom/lib/disk.sh @@ -148,7 +148,9 @@ select_disks() { read -rp "Enter disk path(s) separated by space: " selected fi - [[ -z "$selected" ]] && error "No disk selected" + if [[ -z "$selected" ]]; then + error "No disk selected" + fi # Extract just the device paths (remove size/model info) SELECTED_DISKS=() |
