Browse Source

fix firefox issue

master
pvincent 3 weeks ago
parent
commit
1bbfa85c4c
  1. 22
      src/main

22
src/main

@ -110,11 +110,11 @@ fi
echo "## miaou-bash" echo "## miaou-bash"
echo "==============" echo "=============="
if [[ ! -d /opt/miaou-bash ]]; then
if ! command -v upgrade-miaou-bash >/dev/null; then
curl https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash -s curl https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash -s
else else
echo "miaou-bash already installed!" echo "miaou-bash already installed!"
/opt/miaou-bash/tools/upgrade-miaou-bash
upgrade-miaou-bash
fi fi
echo "## openssh-server" echo "## openssh-server"
@ -147,16 +147,17 @@ fi
echo "## firefox latest" echo "## firefox latest"
echo "=================" echo "================="
firefox_lang=$(echo $LANG | cut -d_ -f1) firefox_lang=$(echo $LANG | cut -d_ -f1)
[[ $firefox_lang == "en" ]] && firefox_lang="en-US"
[[ $firefox_lang == "es" ]] && firefox_lang="en-US"
echo $firefox_lang
[[ $firefox_lang =~ en|es ]] && firefox_lang="en-US"
echo "$firefox_lang"
if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]]; then if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]]; then
set -e set -e
cd /tmp cd /tmp
wget $(curl "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=$firefox_lang" | cut -d '"' -f2) -O firefox-latest.tar.bz2
firefox_archive_url=$(curl -s "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=$firefox_lang" | cut -d '"' -f2)
wget "$firefox_archive_url"
firefox_archive=${firefox_archive_url##*/}
sudo mkdir /opt/firefox -p sudo mkdir /opt/firefox -p
sudo chown $USER /opt/firefox sudo chown $USER /opt/firefox
tar -xjf firefox-latest.tar.bz2 -C /opt
tar -xf "$firefox_archive" -C /opt
cat <<EOF | sudo tee -a /usr/share/applications/firefox.desktop cat <<EOF | sudo tee -a /usr/share/applications/firefox.desktop
[Desktop Entry] [Desktop Entry]
Name=Firefox Name=Firefox
@ -275,20 +276,15 @@ EXTENSIONS=(
) )
compile_schemas_needed=false
for extension in "${EXTENSIONS[@]}"; do for extension in "${EXTENSIONS[@]}"; do
if [[ ! -d $HOME/.local/share/gnome-shell/extensions/$extension ]]; then if [[ ! -d $HOME/.local/share/gnome-shell/extensions/$extension ]]; then
"$HOME/.local/bin/gext" install "$extension" "$HOME/.local/bin/gext" install "$extension"
sudo cp "$HOME"/.local/share/gnome-shell/extensions/"$extension"/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ sudo cp "$HOME"/.local/share/gnome-shell/extensions/"$extension"/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/
compile_schemas_needed=true
else else
echo "extension <${extension}> already installed!" echo "extension <${extension}> already installed!"
fi fi
done done
if "$compile_schemas_needed"; then
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
fi
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
echo "# gnome extra settings" echo "# gnome extra settings"
echo "======================" echo "======================"

Loading…
Cancel
Save