Cleanup and updates for final push
This commit is contained in:
parent
6545a487e6
commit
861657f0ad
2 changed files with 5 additions and 6 deletions
11
scripts/os
11
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
|
||||
|
|
Loading…
Reference in a new issue