From 861657f0ad29c84093142aa2bab3b204b601382b Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 7 Jul 2024 16:36:14 -0400 Subject: [PATCH] Cleanup and updates for final push --- scripts/os | 11 +++++------ scripts/{os_garuda => os_arch} | 0 2 files changed, 5 insertions(+), 6 deletions(-) rename scripts/{os_garuda => os_arch} (100%) diff --git a/scripts/os b/scripts/os index 8e7d90a..9df90ad 100755 --- a/scripts/os +++ b/scripts/os @@ -12,7 +12,7 @@ fi createRestoreDir() { if [[ -d "${restoreDir}" ]]; then - rm -rf "${restoreDir}/*" || exit 2 + rm -rf "${restoreDir:?}/*" || exit 2 else mkdir -p "${restoreDir}" || exit 2 fi @@ -45,10 +45,9 @@ runOsHook() { "${scriptPath}/os_macos" "$hook" elif [[ "$kernel" == "Linux" ]]; then case "$DISTRO" in - ubuntu) "${scriptPath}/os_debian" "$hook";; - debian) "${scriptPath}/os_debian" "$hook";; + debian|ubuntu) "${scriptPath}/os_debian" "$hook";; fedora) "${scriptPath}/os_fedora" "$hook";; - garuda) "${scriptPath}/os_garuda" "$hook";; + arch) "${scriptPath}/os_arch" "$hook";; solus) "${scriptPath}/os_solus" "$hook";; opensuse-leap) "${scriptPath}/os_suse" "$hook";; opensuse-tumbleweed) "${scriptPath}/os_suse" "$hook";; @@ -63,10 +62,10 @@ runOsHook() { hook_before() { checkOS || exit 200 - pushd "$scriptPath" &>/dev/null + pushd "$scriptPath" &>/dev/null || exit 201 git checkout -- . git pull - popd &>/dev/null + popd &>/dev/null || exit 201 createRestoreDir || exit $? runOsHook before diff --git a/scripts/os_garuda b/scripts/os_arch similarity index 100% rename from scripts/os_garuda rename to scripts/os_arch