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() {
|
createRestoreDir() {
|
||||||
if [[ -d "${restoreDir}" ]]; then
|
if [[ -d "${restoreDir}" ]]; then
|
||||||
rm -rf "${restoreDir}/*" || exit 2
|
rm -rf "${restoreDir:?}/*" || exit 2
|
||||||
else
|
else
|
||||||
mkdir -p "${restoreDir}" || exit 2
|
mkdir -p "${restoreDir}" || exit 2
|
||||||
fi
|
fi
|
||||||
|
@ -45,10 +45,9 @@ runOsHook() {
|
||||||
"${scriptPath}/os_macos" "$hook"
|
"${scriptPath}/os_macos" "$hook"
|
||||||
elif [[ "$kernel" == "Linux" ]]; then
|
elif [[ "$kernel" == "Linux" ]]; then
|
||||||
case "$DISTRO" in
|
case "$DISTRO" in
|
||||||
ubuntu) "${scriptPath}/os_debian" "$hook";;
|
debian|ubuntu) "${scriptPath}/os_debian" "$hook";;
|
||||||
debian) "${scriptPath}/os_debian" "$hook";;
|
|
||||||
fedora) "${scriptPath}/os_fedora" "$hook";;
|
fedora) "${scriptPath}/os_fedora" "$hook";;
|
||||||
garuda) "${scriptPath}/os_garuda" "$hook";;
|
arch) "${scriptPath}/os_arch" "$hook";;
|
||||||
solus) "${scriptPath}/os_solus" "$hook";;
|
solus) "${scriptPath}/os_solus" "$hook";;
|
||||||
opensuse-leap) "${scriptPath}/os_suse" "$hook";;
|
opensuse-leap) "${scriptPath}/os_suse" "$hook";;
|
||||||
opensuse-tumbleweed) "${scriptPath}/os_suse" "$hook";;
|
opensuse-tumbleweed) "${scriptPath}/os_suse" "$hook";;
|
||||||
|
@ -63,10 +62,10 @@ runOsHook() {
|
||||||
|
|
||||||
hook_before() {
|
hook_before() {
|
||||||
checkOS || exit 200
|
checkOS || exit 200
|
||||||
pushd "$scriptPath" &>/dev/null
|
pushd "$scriptPath" &>/dev/null || exit 201
|
||||||
git checkout -- .
|
git checkout -- .
|
||||||
git pull
|
git pull
|
||||||
popd &>/dev/null
|
popd &>/dev/null || exit 201
|
||||||
|
|
||||||
createRestoreDir || exit $?
|
createRestoreDir || exit $?
|
||||||
runOsHook before
|
runOsHook before
|
||||||
|
|
Loading…
Reference in a new issue