process archives with filenames containing backslash(es)
Create a single adb backup for each app /sd and inform of missing apks
Brought to you by:
dragomerlin
had to modify for Mac OSX 10.6.8
:::patch
##9 For each folder in apps/ inside the tar archive, list it. There should be only folders.
echo "Generating list of contents for each app..."
basename $i.list ; donebasename $i.list ; donecomplete patch in attachment
regards
A.
Ok but there's also the issue with colon, semicolon, asterisk, question mark... etc
I don't see why you need this since android will never generate a backup with backslash in filenames. Furthermore it's not portable.
If you can provide a real example where this issue could happen I'll be happy to consider it.
sorry, but I really needed that, finding the line
apps/com.google.android.apps.plus/sp/mm_utils\0.xml
in com.google.android.apps.plus.list
for apps/com.google.android.apps.plus/sp/mm_utils\0.xml
could be OS specific, don't know
regards
A.
The sed commands you provide don't work on cygwin
sed -e 's/\/\/'
sed: -e expression #1, char 7: unterminated `s' command
$ echo '/cygdrive/c/backup/apps/com.google.android.apps.plus/sp/mm_utils\0.xml' | sed -e 's/\\/\/'
/cygdrive/c/backup/apps/com.google.android.apps.plus/sp/mm_utils\0.xml
What is the real name of the file, "0.xml" or "mm_utils\0.xml"?
sorry for the delay, beeing on holidays
regards
A.
Last edit: Andreas Stern 2015-08-16
I've tested your sed line in Yosemite and it replaces two or more consecutive backslashes with a single one. If two fail one will do the same. Did you mean to do that or do you mean to remove all backslashes?
Last edit: dragomerlin 2015-08-16
the substitution ( which was not tested on more than that one case, so not "really" tested ) replaces two backslashes by one and made the script work in my special case. The patch contains four backslashes in the search part of the sed substitute command and two slashes in the replace part in order to be processed correctly - was unable to edit original post, so let me repeat
~~~~~
@@ -116,7 +118,7 @@
echo "Done"
##9 For each folder in apps/ inside the tar archive, list it. There should be only folders.
echo "Generating list of contents for each app..."
basename $i.list ; donebasename $i.list ; doneecho "Done"
~~~~~~
Last edit: Andreas Stern 2015-08-16
Did you install star on OS X?
Ok, I've compiled star from source code and manually installed it on OS X Yosemite 10.10.5 with no major issues. I guess I have to write a Readme about how to compile and install star on cygwin and mac.
I've tested your patch and it works perfectly. It preserves the double backslash in the resulting ab (tar) files. I was in doubt that it stored only a single backslash in them. I will update things as soon as possible.
Yes, installed star using Homebrew, works on OS X 10.6.8
short how2:
recall info:
~~~~~
$ brew info star
star: stable 1.5.3
Standard tap archiver
http://cdrecord.org/private/star.html
/usr/local/Cellar/star/1.5.3 (81 files, 1,7M) *
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/star.rb
==> Dependencies
Build: smake ✔
~~~~~~
Last edit: Andreas Stern 2015-08-18
Download updated. Thank for bringing this issue to my attention.