Add deploy-script
This commit is contained in:
parent
1ab8dad512
commit
27cc33b17b
1 changed files with 57 additions and 1 deletions
56
fenix-fox.sh
56
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!"
|
||||
|
||||
|
|
Loading…
Reference in a new issue