Advertisement
Perka

Untitled

Dec 20th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #!/sbin/sh
  2.  
  3. # Creating the initiation for ui_print from within a .sh file to recovery ui
  4. # this was created by Chainfire. Not really needed here but good fun!
  5.  
  6. # get file descriptor for output
  7. OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3);
  8.  
  9. ui_print() {
  10. if [ $OUTFD != "" ]; then
  11. echo "ui_print ${1} " 1>&$OUTFD;
  12. echo "ui_print " 1>&$OUTFD;
  13. else
  14. echo "${1}";
  15. fi;
  16. }
  17.  
  18. # --- actual script for checking the buildversion and installing the mod---
  19. ui_print "";
  20. ui_print " Checking buildnumber";
  21. buildnumber=$(cat /system/build.prop | grep -e "ro.build.version.incremental=eng.pawitp.*.")
  22. if [ $buildnumber = "ro.build.version.incremental=eng.pawitp.$1" ]; then
  23. ui_print " Build does match this mod";
  24. ui_print " Installing mod";
  25. cp -rf /tmp/system/* /system
  26. rm -rf /tmp/system/
  27. else
  28. ui_print " Build doesn't match this mod";
  29. ui_print " Not installing mod";
  30. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement