Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/sbin/sh
- # Creating the initiation for ui_print from within a .sh file to recovery ui
- # this was created by Chainfire. Not really needed here but good fun!
- # get file descriptor for output
- OUTFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3);
- ui_print() {
- if [ $OUTFD != "" ]; then
- echo "ui_print ${1} " 1>&$OUTFD;
- echo "ui_print " 1>&$OUTFD;
- else
- echo "${1}";
- fi;
- }
- # --- actual script for checking the buildversion and installing the mod---
- ui_print "";
- ui_print " Checking buildnumber";
- buildnumber=$(cat /system/build.prop | grep -e "ro.build.version.incremental=eng.pawitp.*.")
- if [ $buildnumber = "ro.build.version.incremental=eng.pawitp.$1" ]; then
- ui_print " Build does match this mod";
- ui_print " Installing mod";
- cp -rf /tmp/system/* /system
- rm -rf /tmp/system/
- else
- ui_print " Build doesn't match this mod";
- ui_print " Not installing mod";
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement