From 75ff3a30091b17fc6499503e859fb464343246e9 Mon Sep 17 00:00:00 2001 From: jutty Date: Fri, 12 Jul 2024 07:24:00 -0300 Subject: [PATCH] Standardize indentation --- src/check.sh | 10 +++++----- src/package/validate_input_packages.sh | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/check.sh b/src/check.sh index 2421b01..b0df8ff 100644 --- a/src/check.sh +++ b/src/check.sh @@ -1,9 +1,9 @@ check() { - base_files="$(scan_directory "$CONFIG_ROOT/base")" - bkp_files="$(scan_directory "$CONFIG_ROOT/bkp")" + base_files="$(scan_directory "$CONFIG_ROOT/base")" + bkp_files="$(scan_directory "$CONFIG_ROOT/bkp")" - log debug "collected base files:\n$base_files" - log debug "collected bkp files:\n$bkp_files" + log debug "collected base files:\n$base_files" + log debug "collected bkp files:\n$bkp_files" - scan_packages + scan_packages } diff --git a/src/package/validate_input_packages.sh b/src/package/validate_input_packages.sh index 55d8360..ce183ef 100644 --- a/src/package/validate_input_packages.sh +++ b/src/package/validate_input_packages.sh @@ -8,15 +8,15 @@ validate_input_packages() { echo "$package_list" | xargs | sed 's/ /\n/g' | while read -r package; do - if echo "$package" | grep -q "$invalid_characters_pattern"; then - log user "Invalid package: $package (contains invalid characters)" - return 1 - fi - if grep -qw "$package" "$PACKAGE_CACHE"; then - log debug "Found in package cache: $package" - else - log user "Invalid package: $package (not found in package cache)" - return 1 - fi - done + if echo "$package" | grep -q "$invalid_characters_pattern"; then + log user "Invalid package: $package (contains invalid characters)" + return 1 + fi + if grep -qw "$package" "$PACKAGE_CACHE"; then + log debug "Found in package cache: $package" + else + log user "Invalid package: $package (not found in package cache)" + return 1 + fi +done }