#/bin/sh ##xianyuhui(阿辉) ##xianyuhui1987@163.com mypath=${0%/*} export PATH=$mypath:$PATH /etc/initservices/services/ezxenv.sh LANG_TYPE=`cat /ezxlocal/download/appwrite/setup/ezx_system.cfg | grep ^LanguageType` if [ "$LANG_TYPE" = "LanguageType = zh-cn" ] then title1="Find Lost Game" title2="Phone Memory" title3="Memory card" title4="Done,need to reboot the phone!" title5="Can not find the lost game!" else title1="Find Lost Game" title2="Phone Memory" title3="Memory card " title4="Done,need to reboot the phone!" title5="Can not find the lost game" fi lost=`grep '\[' /ezxlocal/download/appwrite/am/InstalledDB |sed 's/\[//g' |sed 's/\]//g' |busybox tr -s "\n" ";"` chk=`cat /ezxlocal/download/appwrite/am/UserMenuTree |grep $lost` Card() { cat /mmc/mmca1/.system/java/MemoryCardConfig\ \(1\) >> /mmc/mmca1/.system/java/MemoryCardConfig rm -f /mmc/mmca1/.system/java/MemoryCardConfig\ \(1\) } phone() { sed "/\[67dc1191-2928-4938-abce-1a73cb5ce490\]/,/^Items/{s/^Items/Items\ \=\ $lost/}" /ezxlocal/download/appwrite/am/UserMenuTree >/ezxlocal/download/appwrite/am/UserMenuTree.tmp mv /ezxlocal/download/appwrite/am/UserMenuTree.tmp /ezxlocal/download/appwrite/am/UserMenuTree } option1() { if [ "$chk" = "" ] then phone ok else erorr fi } option2() { if [ -f /mmc/mmca1/.system/java/MemoryCardConfig\ \(1\) ] then Card ok else erorr fi } ok() { showQ "" "$title4" 2 } erorr() { showQ "" "$title5" 2 } main() { showRadio "$title1" "" "$title2" "$title3" case $? in 1) option1 ;; 2) option2 ;; *) exit 0 ;; esac } main