Critical update: correcting Firefox installation workflow

This commit is contained in:
Muhammad Rivan 2021-05-30 19:19:49 +07:00
parent 34786640b9
commit 83c91c284d
No known key found for this signature in database
GPG key ID: C56A200FD936FAAA
2 changed files with 4 additions and 9 deletions

View file

@ -434,6 +434,7 @@ revert_gdm_theme() {
install_firefox_theme() { install_firefox_theme() {
remove_firefox_theme remove_firefox_theme
userify mkdir -p "${FIREFOX_THEME_DIR}"
userify cp -rf "${FIREFOX_SRC_DIR}" "${FIREFOX_THEME_DIR}" userify cp -rf "${FIREFOX_SRC_DIR}" "${FIREFOX_THEME_DIR}"
config_firefox config_firefox
} }

View file

@ -67,20 +67,14 @@ while [[ $# -gt 0 ]]; do
edit_firefox="true" ;; edit_firefox="true" ;;
esac esac
if [[ -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]; then if ! has_command firefox && [[ ! "$(flatpak list --columns=application 2> /dev/null | grep org.mozilla.firefox)" ]]; then
FIREFOX_DIR_HOME=${FIREFOX_FLATPAK_DIR_HOME}
mkdir -p ${FIREFOX_FLATPAK_THEME_DIR}
FIREFOX_THEME_DIR=${FIREFOX_FLATPAK_THEME_DIR}
fi;
if [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]] && ! has_command firefox; then
prompt -e "'${1}' ERROR: There's no Firefox installed in your system" prompt -e "'${1}' ERROR: There's no Firefox installed in your system"
has_any_error="true" has_any_error="true"
elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then elif [[ ! -d "${FIREFOX_DIR_HOME}" ]] && (has_command flatpak && [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]); then
prompt -e "'${1}' ERROR: Firefox is installed but not yet initialized." prompt -e "'${1}' ERROR: Firefox is installed but not yet initialized."
prompt -w "'${1}': Don't forget to close it after you run/initialize it" prompt -w "'${1}': Don't forget to close it after you run/initialize it"
has_any_error="true" has_any_error="true"
elif pidof "firefox" &> /dev/null; then elif pidof "firefox" &> /dev/null || pidof "firefox-bin" &> /dev/null; then
prompt -e "'${1}' ERROR: Firefox is running, please close it" prompt -e "'${1}' ERROR: Firefox is running, please close it"
has_any_error="true" has_any_error="true"
fi; shift ;; fi; shift ;;