View Single Post
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#82
Hi MAG
I added your work to my N9 QTweak..
Can you please check if i wrote correctly all commands for install and uninstall ? All my script run as root.
Thanks for your work.

Code:
    # MT-Toggles
      t|T)
      echo -e "${YELLOW}Install/Uninstall MT-Toggles${NORMAL}"
		echo ""
		echo -en ${RED}	
		echo -e "This tweak ONLY for users that have  ${YELLOW}INCEPTION${RED}  installed !!!"
		echo "Do you sure you want to continue ?"
		echo -en ${NORMAL}
		echo ""		
		echo -e "1. ${BLINK}${RED}YES !!!, I have ${YELLOW}Inception${RED} & want to install${NORMAL}"
		echo "2. NO !!!, I don't have Inception"		
		echo ""
	read -p "Choose from 1 or 2: " ANS
	echo ""
		case $ANS in
	[1] ) echo -en ${RED}
	echo -e "This tweak will install/uninstall ${YELLOW}unrestricted-system-ui & 4 MT-Toggles${RED}"
	echo "It can cause Reboot-loop. If you don't want to continue, just press Enter for Exit."
	echo -en ${NORMAL}
	   echo "" 
		echo "Options:"
		echo -e "1. INSTALL (for ${BLINK}${YELLOW}N9${NORMAL} users)"
		echo -e "2. INSTALL (for ${BLINK}${YELLOW}N950${NORMAL} users)"		
		echo "3. UNINSTALL"	
         echo ""
         read -p "Choose from 1 to 3: " ANS
         echo ""
		case $ANS in
			[1] ) /usr/sbin/incept /opt/N9QTweak/Toggles/system-ui_1.2.24-2+0m7_armel.deb
dpkg -i /opt/N9QTweak/Toggles/mt-toggles_0.0.1_armel.deb
/usr/sbin/incept /opt/N9QTweak/Toggles/psm-toggle_0.0.1_armel.deb
/usr/sbin/incept /opt/N9QTweak/Toggles/flightmode-toggle_0.0.1_armel.deb
echo ""
echo -e "${BLINK}${RED}Wait!${NORMAL}"
killall sysuid	
dpkg -i /opt/N9QTweak/Toggles/bluetooth-toggle_0.0.1_armel.deb
dpkg -i /opt/N9QTweak/Toggles/flashlight-toggle_0.0.1_armel.deb
stop xsession/sysuid
start xsession/sysuid
echo ""		
			echo -e "${YELLOW}DONE! Unrestricted system-ui & MT-Toggles installed successfully.${NORMAL}" ;;
			
			[2] ) /usr/sbin/incept /opt/N9QTweak/Toggles/system-ui_1.2.23-1+0m7_armel.deb
dpkg -i /opt/N9QTweak/Toggles/mt-toggles_0.0.1_armel.deb
/usr/sbin/incept /opt/N9QTweak/Toggles/psm-toggle_0.0.1_armel.deb
/usr/sbin/incept /opt/N9QTweak/Toggles/flightmode-toggle_0.0.1_armel.deb
echo ""
echo -e "${BLINK}${RED}Wait!${NORMAL}"
killall sysuid	
dpkg -i /opt/N9QTweak/Toggles/bluetooth-toggle_0.0.1_armel.deb
dpkg -i /opt/N9QTweak/Toggles/flashlight-toggle_0.0.1_armel.deb
stop xsession/sysuid
start xsession/sysuid
echo ""		
			echo -e "${YELLOW}DONE! Unrestricted system-ui & MT-Toggles installed successfully.${NORMAL}" ;;
			
			[3] ) apt-get remove flashlight-toggle bluetooth-toggle flightmode-toggle psm-toggle mt-toggles
			apt-get install --reinstall system-ui
echo ""		
			echo -e "${YELLOW}DONE! Unrestricted system-ui & MT-Toggles uninstalled successfully.${NORMAL}" ;;	
		* ) read -p "Just answer with either 1 to 3. Aborting!" end; continue ;;
		esac
      echo " " ;;
      								
	[2] ) echo -e "${YELLOW}You chose to NOT continue.${NORMAL}" ;;	
		* ) read -p "Just answer with either 1 or 2. Aborting!" end; continue ;;
		esac
      echo " " ;;

Last edited by Schturman; 2012-06-17 at 04:53.