DoctorD90

tclkit.sh

Feb 21st, 2015
374
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.13 KB | None | 0 0
  1. echo "*Started"
  2.  
  3. ### SETTINGS
  4. #Your /system folder, it may change
  5. psys=/system
  6. #Your bin folder
  7. pbin=/system/bin
  8. #Old tclkit version
  9. tclold=tclkit861
  10. #New tclkit version
  11. tclnew=tclkit863
  12.  
  13. ### DO NOT EDIT BELOW
  14.  
  15. #/system folder check
  16. if ! [ -d "$psys" ]; then
  17.     echo "$psys not found"
  18.     echo "Please check for your /system folder path"
  19.     return
  20. fi
  21.  
  22. #/system/bin folder check
  23. if ! [ -d "$pbin" ]; then
  24.     echo "$pbin not found"
  25.     echo "Please check for your /system/bin folder path"
  26.     return
  27. fi
  28.  
  29. #mount
  30. #/dev/block/mtdblock2 /system yaffs2 ro 0 0
  31. ln=$(mount | grep "$psys")
  32.  
  33. #/dev/block/mtdblock2
  34. ptin=$(echo $ln | cut -d " " -f1)
  35.  
  36. #/system
  37. ptout=$(echo $ln | cut -d " " -f2)
  38.  
  39. #yaffs2
  40. fs=$(echo $ln | cut -d " " -f3)
  41.  
  42. echo "*Mountig_System_RW"
  43. mount -oremount,rw -t "$fs" "$ptin" "$ptout"
  44.  
  45. if [ -f "$pbin/$tclold"]; then
  46. echo "*BackingUp_Old"
  47. cp "$pbin/$tclold" "$tclold"
  48.  
  49. echo "*Removing_Old"
  50. rm "$pbin/$tclold"
  51. fi
  52.  
  53. echo "*Installing_New"
  54. cp "$tclnew" "$pbin/$tclnew"
  55.  
  56. echo "*chmod_555_New"
  57. chmod 555 "$pbin/$tclnew"
  58.  
  59. echo "*Mountig_System_RO"
  60. mount -oremount,ro -t "$fs" "$ptin" "$ptout"
  61.  
  62. echo "*Ended"
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment