feature/os-debian-no-aptitude #1

Merged
psi-jack merged 10 commits from feature/os-debian-no-aptitude into master 2024-07-07 16:39:20 -04:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 861657f0ad - Show all commits

View file

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