From 68754482dc0986497d5a824e11ace1674a7b47c9 Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Wed, 22 Nov 2023 23:57:27 +0100 Subject: [PATCH 1/2] fix not passing by arguments --- fenix-fox.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 046dded..412e0c4 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -32,10 +32,10 @@ enable_profile_customizations() { } installcss() { - if [[ ! -n "$2" ]]; then + if [[ ! -n "$arg2" ]]; then config="true-mobile" else - config=$1 + config=$arg2 fi case $config in @@ -76,7 +76,7 @@ deploy_true_mobile() { mv $installdir/chrome $installdir/chrome.original fi mkdir $installdir/chrome - 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/{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 } @@ -96,7 +96,12 @@ clonerepo() { # ## Main # -case "$1" in + +# fix not passing by arguments +arg1=$1 +arg2=$2 + +case "$arg1" in --install) enable_profile_customizations installcss From be014305fe3d593203c2a7e2b1e38596e5efd39a Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Thu, 23 Nov 2023 00:16:31 +0100 Subject: [PATCH 2/2] Some improvements --- fenix-fox.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fenix-fox.sh b/fenix-fox.sh index 412e0c4..06e52ca 100755 --- a/fenix-fox.sh +++ b/fenix-fox.sh @@ -31,6 +31,13 @@ enable_profile_customizations() { fi } +takebackup() { + echo "Copy files in place and enable fenix-fox" + if [ -d "${installdir}/chrome" ]; then + echo "dir chrome already there, take backup" + mv $installdir/chrome $installdir/chrome.`date +%Y%m%d-%H%M%S` + fi +} installcss() { if [[ ! -n "$arg2" ]]; then config="true-mobile" @@ -58,10 +65,7 @@ installcss() { deploy_fenix_fox() { echo "Copy files in place and enable fenix-fox" - if [ -d "${installdir}/chrome" ]; then - echo "dir chrome already there, take backup" - mv $installdir/chrome $installdir/chrome.original - fi + takebackup mkdir $installdir/chrome cp -r src/userChrome/fenix_fox.css $installdir/chrome/ cp -r src/userChrome/dynamic_popups_pro.css $installdir/chrome/ @@ -71,12 +75,9 @@ deploy_fenix_fox() { 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 + takebackup mkdir $installdir/chrome - 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/* $installdir/chrome/ cp src/userChrome/userChrome-true-mobile.css $installdir/chrome/userChrome.css cp src/userContent/theme-fenix.css $installdir/chrome/userContent.css }