Merge pull request #267 from rivanfebrian123/master
Critical update: new error handling
This commit is contained in:
commit
4323bfa4ea
2 changed files with 16 additions and 13 deletions
|
@ -161,7 +161,7 @@ start_animation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_animation() {
|
stop_animation() {
|
||||||
kill -13 "${ANIM_PID}" &> /dev/null || true
|
[[ -e "/proc/${ANIM_PID}" ]] && kill -13 "${ANIM_PID}"
|
||||||
setterm -cursor on
|
setterm -cursor on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ rootify() {
|
||||||
trap true SIGINT
|
trap true SIGINT
|
||||||
prompt -w "Executing '$(echo "${@}" | cut -c -35 )...' as root"
|
prompt -w "Executing '$(echo "${@}" | cut -c -35 )...' as root"
|
||||||
sudo ${@} || operation_aborted
|
sudo ${@} || operation_aborted
|
||||||
trap stop_animation SIGINT
|
trap signal_exit SIGINT
|
||||||
}
|
}
|
||||||
|
|
||||||
full_rootify() {
|
full_rootify() {
|
||||||
|
@ -481,7 +481,7 @@ full_rootify() {
|
||||||
userify() {
|
userify() {
|
||||||
trap true SIGINT
|
trap true SIGINT
|
||||||
sudo -u "${MY_USERNAME}" ${@} || operation_aborted
|
sudo -u "${MY_USERNAME}" ${@} || operation_aborted
|
||||||
trap stop_animation SIGINT
|
trap signal_exit SIGINT
|
||||||
}
|
}
|
||||||
|
|
||||||
signal_exit() {
|
signal_exit() {
|
||||||
|
@ -543,6 +543,7 @@ finalize_argument_parsing() {
|
||||||
rm -rf "${WHITESUR_TMP_DIR}"; mkdir -p "${WHITESUR_TMP_DIR}"
|
rm -rf "${WHITESUR_TMP_DIR}"; mkdir -p "${WHITESUR_TMP_DIR}"
|
||||||
rm -rf "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
|
rm -rf "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
|
||||||
exec 2> "${WHITESUR_TMP_DIR}/error_log.txt"
|
exec 2> "${WHITESUR_TMP_DIR}/error_log.txt"
|
||||||
trap 'operation_aborted' ERR; trap 'signal_exit' SIGINT; trap 'signal_exit' EXIT
|
trap 'operation_aborted' ERR
|
||||||
|
trap 'signal_exit' INT EXIT TERM
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,17 +439,19 @@ install_firefox_theme() {
|
||||||
}
|
}
|
||||||
|
|
||||||
config_firefox() {
|
config_firefox() {
|
||||||
killall "firefox" &> /dev/null
|
killall "firefox" &> /dev/null || true
|
||||||
|
|
||||||
for d in "${FIREFOX_DIR_HOME}/"*"default"*; do
|
for d in "${FIREFOX_DIR_HOME}/"*"default"*; do
|
||||||
rm -rf "${d}/chrome"
|
if [[ -f "${d}/prefs.js" ]]; then
|
||||||
userify ln -sf "${FIREFOX_THEME_DIR}" "${d}/chrome"
|
rm -rf "${d}/chrome"
|
||||||
userify_file "${d}/prefs.js"
|
userify ln -sf "${FIREFOX_THEME_DIR}" "${d}/chrome"
|
||||||
echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "${d}/prefs.js"
|
userify_file "${d}/prefs.js"
|
||||||
echo "user_pref(\"browser.tabs.drawInTitlebar\", true);" >> "${d}/prefs.js"
|
echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "${d}/prefs.js"
|
||||||
echo "user_pref(\"browser.uidensity\", 0);" >> "${d}/prefs.js"
|
echo "user_pref(\"browser.tabs.drawInTitlebar\", true);" >> "${d}/prefs.js"
|
||||||
echo "user_pref(\"layers.acceleration.force-enabled\", true);" >> "${d}/prefs.js"
|
echo "user_pref(\"browser.uidensity\", 0);" >> "${d}/prefs.js"
|
||||||
echo "user_pref(\"mozilla.widget.use-argb-visuals\", true);" >> "${d}/prefs.js"
|
echo "user_pref(\"layers.acceleration.force-enabled\", true);" >> "${d}/prefs.js"
|
||||||
|
echo "user_pref(\"mozilla.widget.use-argb-visuals\", true);" >> "${d}/prefs.js"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue