pastebin - collaborative debugging tool
kpaste.net RSS


BetterBatteryStats Backup Script
Posted by Anonymous on Thu 26th Jun 2014 12:36
raw | new post

  1. #!/sbin/sh
  2. #
  3. # /system/addon.d/60-bbs.sh
  4. #
  5.  
  6. . /tmp/backuptool.functions
  7.  
  8. list_files() {
  9. cat <<EOF
  10. priv-app/com.asksven.betterbatterystats_xdaedition.apk
  11. EOF
  12. }
  13.  
  14. case "$1" in
  15.   backup)
  16.     list_files | while read FILE DUMMY; do
  17.       backup_file $S/"$FILE"
  18.     done
  19.   ;;
  20.   restore)
  21.     list_files | while read FILE REPLACEMENT; do
  22.       R=""
  23.       [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
  24.       [ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
  25.     done
  26.   ;;
  27.   pre-backup)
  28.     # Stub
  29.   ;;
  30.   post-backup)
  31.     # Stub
  32.   ;;
  33.   pre-restore)
  34.     # Stub
  35.   ;;
  36.   post-restore)
  37.     # Stub
  38.   ;;
  39. esac

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at