Cleanup and updates for final push

This commit is contained in:
Eric Renfro 2024-07-07 16:36:14 -04:00
parent 6545a487e6
commit 861657f0ad
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
2 changed files with 5 additions and 6 deletions

View file

@ -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