From 27cc33b17be214e202d532c0416adc0bfba65580 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Sun, 19 Nov 2023 23:07:05 +0100 Subject: [PATCH] Add deploy-script --- fenix-fox.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 6c11249..a5627c3 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -1,3 +1,59 @@ #!/bin/sh -# +# +## Variables +# +# firefox dirs +firefox_root="~/.mozilla/firefox" # Not in use jet because of a not known issue... +firefox_profiledir="*.default-release" +installdir=`find ~/.mozilla/firefox -name $firefox_profiledir` + +# git repo +fenix_fox="https://git.datenkastl.org/pmOS-tweaks/fenix-fox.git" +clonedir="/tmp/fenix-fox" + +# +## Funktions +# +enable_profile_customizations() { + echo "Enable *toolkit.legacyUserProfileCustomizations.stylesheets* with user.js" + if [ ! -e "${installdir}/user.js" ]; then + echo 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);' \ + > $installdir/user.js + elif grep -q toolkit.legacyUserProfileCustomizations.stylesheets $installdir/user.js + then + echo "user.js with *toolkit.legacyUserProfileCustomizations.stylesheets* already there" + echo "Do nothing! Please enable manually if not enabled!" + else + echo "Enable *toolkit.legacyUserProfileCustomizations.stylesheets* with user.js" + echo 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);' \ + >> $installdir/user.js + fi +} + +deploy_fenix_fox() { + echo "Copy files in place and enable fenix-fox" + cp -r src/userChrome $installdir/chrome + cp src/userChrome/userChrome-fenix_fox.css $installdir/chrome/ +} + +# Clonerepo not in use +clonerepo() { + echo "clone fenix-fox to /tmp" + mkdir -p $clonedir + git clone $fenix_fox $clonedir +} + +# +## Main +# + +# Setup Profile Customizations in user.js +enable_profile_customizations + +# Copy files to profile +deploy_fenix_fox + +# finish +echo "Finished! Restart firefox and enjoy your new design!" +