#
#**************************************************************************
#* *
#* atp-get install.sh *
#* 12 November, 2011 *
#* *
#* created by: Freeman *
#* *
#* Shows a menu with numeric options to choose a system *
#* The current options are 1, 2, and 3 etc. Any other option will display *
#* an error message and then print a new menu. *
#* Use a Ctrl-C to exit the shell script and get back to a command *
#* prompt. *
#* *
#**************************************************************************
while [ 1 ]
do
clear # clear the screen
# display the menu
echo " "
echo " "
echo " ***************************************************************"
echo " ** **"
echo " ** Enter the number of the system **"
echo " ** **"
echo " ** 1 - eth2 change to 192.168.100.2 **"
echo " ** 2 - eth0 change to 192.168.100.20 **"
echo " ** 3 - sudo minicom -s **"
echo " ** 4 - Open file **"
echo " ** 5 - Open Source Insight **"
echo " ** 6 - mount -t smbfs //111.2.1.148/home/ **"
echo " ** 7 - sync from local to 111.2.1.148/Backup **"
echo " ** 8 - sync code from 111.2.1.148 to local **"
echo " ** ************* write code ********************* **"
echo " ** 81 - sync code from /home/freeman/a_temp/NTGR_D3_CableRG/Porting/Source/ to /media/111_2_1_148/luke/temp_201111291500/NTGR_D3_CableRG/Porting/Source/ **"
echo " ** 9 - cp ecram_sto.bin to local **"
echo " ** 10- sync code from local to 111.2.1.148 **"
echo " ** **"
echo " ***************************************************************"
echo " "
echo " "
read input # read character input
case $input in
1)
sudo ifconfig eth2 192.168.100.2
ifconfig
sleep 1;; # leave the message on the screen for 5 seconds;;
2)
sudo ifconfig eth0 192.168.100.20
ifconfig
sleep 1;; # leave the message on the screen for 5 seconds;;
3)
sudo minicom -s;;
4)
sudo cd /
nohup kate /home/freeman/NTGR_D3_CableRG/Porting/Source/APP/Software_Module/TWCXML/OPT67ControllerThread.cpp &
sleep 1
cd /
nohup kate /home/freeman/NTGR_D3_CableRG/Porting/Source/WWW/handler/genie/HttpFormHandlerRgInternetStatus.cpp &
;;
5)
env WINEPREFIX="/home/freeman/.wine" wine C:\\windows\\command\\start.exe /Unix /home/freeman/.wine/dosdevices/c:/users/Public/Start\ Menu/Programs/Source\ Insight\ 3/Source\ Insight\ 3.5.lnk
;;
6)
sudo mount //111.2.1.148/home /media/111_2_1_148/ -o user=root,password=happy
;;
7)
sudo mount //111.2.1.148/home /media/111_2_1_148/ -o user=root,password=happy
sudo rsync -avz --progress /home/freeman/Backup/ /media/111_2_1_148/luke/Backup
;;
8)
sudo mount //111.2.1.148/home /media/111_2_1_148/ -o user=root,password=happy
sudo rsync -avz --progress /media/111_2_1_148/luke/temp_201111291500/ /home/freeman/a_temp/
;;
#***************************************************************************************************************************
81)
sudo mount //111.2.1.148/home /media/111_2_1_148/ -o user=root,password=happy
sudo rsync -avz --progress /home/freeman/a_temp/NTGR_D3_CableRG/Porting/Source/ /media/111_2_1_148/luke/temp_201111291500/NTGR_D3_CableRG/Porting/Source/
;;
9)
echo "cp /media/111_2_1_148/luke/temp_201111291500/NTGR_D3_CableRG/CmDocsisSystem/ecos/CG3100D_eu_ipv6/ecram_sto.bin /home/freeman/a_temp/NTGR_D3_CableRG/CmDocsisSystem/ecos/CG3100D_eu_ipv6"
cp /media/111_2_1_148/luke/temp_201111291500/NTGR_D3_CableRG/CmDocsisSystem/ecos/CG3100D_eu_ipv6/ecram_sto.bin /home/freeman/NTGR_D3_CableRG/CmDocsisSystem/ecos/CG3100D_eu_ipv6
;;
10)
sudo mount //111.2.1.148/home /media/111_2_1_148/ -o user=root,password=happy
sudo rsync -avz --stats --progress --exclude-from '/home/freeman/a_temp/exclude.txt' /home/freeman/a_temp/NTGR_D3_CableRG/Porting/Source/ /media/111_2_1_148/luke/temp_201111291500/NTGR_D3_CableRG/Porting/Source/
echo "rsync done"
for i in {1..10}
do
echo -en "\007"
sleep 1
done
;;
*) clear
echo " "
echo " "
echo "I didn't understand that input."
sleep 1
;; # leave the message on the screen for 5 seconds
esac
$0 # issue this command again
done
0 意見:
張貼留言