Add support for different flavors
This commit is contained in:
		
							parent
							
								
									5510dcfebc
								
							
						
					
					
						commit
						a0cd858cff
					
				
					 1 changed files with 53 additions and 9 deletions
				
			
		
							
								
								
									
										62
									
								
								fenix-fox.sh
									
										
									
									
									
								
							
							
						
						
									
										62
									
								
								fenix-fox.sh
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -31,6 +31,31 @@ enable_profile_customizations() {
 | 
			
		|||
	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() {
 | 
			
		||||
	echo "Copy files in place and enable fenix-fox"
 | 
			
		||||
	if [ -d "${installdir}/chrome" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -43,6 +68,22 @@ deploy_fenix_fox() {
 | 
			
		|||
	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() {
 | 
			
		||||
	echo "clone fenix-fox to /tmp"
 | 
			
		||||
| 
						 | 
				
			
			@ -53,13 +94,16 @@ clonerepo() {
 | 
			
		|||
#
 | 
			
		||||
## 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
 | 
			
		||||
 | 
			
		||||
# Copy files to profile
 | 
			
		||||
deploy_fenix_fox
 | 
			
		||||
 | 
			
		||||
# finish
 | 
			
		||||
echo "Finished! Restart firefox and enjoy your new design!"
 | 
			
		||||
 | 
			
		||||
	*)
 | 
			
		||||
		showhelp
 | 
			
		||||
		exit 0
 | 
			
		||||
		;;
 | 
			
		||||
esac
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue