diff --git a/src/main b/src/main index 30eae00..851cce4 100755 --- a/src/main +++ b/src/main @@ -110,11 +110,11 @@ fi echo "## miaou-bash" 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 else echo "miaou-bash already installed!" - /opt/miaou-bash/tools/upgrade-miaou-bash + upgrade-miaou-bash fi echo "## openssh-server" @@ -147,16 +147,17 @@ fi echo "## firefox latest" echo "=================" 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 set -e 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 chown $USER /opt/firefox - tar -xjf firefox-latest.tar.bz2 -C /opt + tar -xf "$firefox_archive" -C /opt cat < already installed!" fi 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 "======================"