Add support for different flavors

This commit is contained in:
Fliegerjohn 2023-11-22 23:17:01 +01:00
parent 5510dcfebc
commit a0cd858cff
Signed by: fliegerjohn
GPG key ID: E2221D5FE4656B6A

View file

@ -31,6 +31,31 @@ enable_profile_customizations() {
fi fi
} }
installcss() {
if [[ ! -n "$2" ]]; then
config="true-mobile"
else
config=$1
fi
case $config in
true-mobile)
deploy_true_mobile
;;
fenix-fox)
deploy_fenix_fox
;;
*)
echo "Available options: true-mobile, fenix-fox"
exit 1
;;
esac
}
deploy_fenix_fox() { deploy_fenix_fox() {
echo "Copy files in place and enable fenix-fox" echo "Copy files in place and enable fenix-fox"
if [ -d "${installdir}/chrome" ]; then if [ -d "${installdir}/chrome" ]; then
@ -43,6 +68,22 @@ deploy_fenix_fox() {
cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css
} }
deploy_true_mobile() {
echo "Copy files in place and enable true-mobile"
if [ -d "${installdir}/chrome" ]; then
echo "dir chrome already there, take backup"
mv $installdir/chrome $installdir/chrome.original
fi
cp src/userChrome/{true_mobile_landscape.css,appMenu.css,editBookmarkPanel.css,findbar.css,popups.css,root.css,tabmenu.css,urlbar.css,extensions_menu.css,alt-browser-alt.css,custom_rules.css,iconized_main_menu.css,round_ui_items.css,numbered_tabs.css,tab_counter.css,true_mobile_mode.css,dynamic_popups_pro.css} $installdir/chrome
cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css
cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css
}
showhelp() {
echo "It's in progress... See https://git.datenkastl.org/pmOS-tweaks/fenix-fox"
}
# Clonerepo not in use # Clonerepo not in use
clonerepo() { clonerepo() {
echo "clone fenix-fox to /tmp" echo "clone fenix-fox to /tmp"
@ -53,13 +94,16 @@ clonerepo() {
# #
## Main ## Main
# #
case "$1" in
--install)
enable_profile_customizations
installcss
echo "Finished! Restart firefox and enjoy your new design!"
exit 0
;;
# Setup Profile Customizations in user.js *)
enable_profile_customizations showhelp
exit 0
# Copy files to profile ;;
deploy_fenix_fox esac
# finish
echo "Finished! Restart firefox and enjoy your new design!"