X-Git-Url: https://arthur.barton.de/gitweb/?p=iPhone2Mac.git;a=blobdiff_plain;f=iPhone2Mac.sh;fp=iPhone2Mac.sh;h=df7ea4f2d2c3d08938e9389d4666f0642ec049ee;hp=f639cac44a6c12dfc59fa5b9f50404ec2fa1cb19;hb=73888b333052731b133e933ea8cfed82dedb3f8b;hpb=a125fb8743e2ccec1d5df3754690b29c4a498d80 diff --git a/iPhone2Mac.sh b/iPhone2Mac.sh index f639cac..df7ea4f 100755 --- a/iPhone2Mac.sh +++ b/iPhone2Mac.sh @@ -46,20 +46,24 @@ fi verbose "iPhone Backup directory is \"$PWD\"." if [ -z "$call_db" ]; then - verbose "Locating SQLite call database ..." + verbose "Locating SQLite call database(s) ..." call_db=$(for f in `file * | fgrep SQLite | cut -d':' -f1`; do sqlite3 "$f" ".schema" | fgrep "CREATE TABLE call (" >/dev/null; [ $? -eq 0 ] && echo "$f"; done ) fi -verbose "Call database is \"$call_db\"." +for f in $call_db; do + verbose "Found call database: \"$f\"" +done if [ -e "$CALL_LOG" ]; then debug "Copying existing ASCII call log ..." cp "$CALL_LOG" "$CALL_TMP" || abort "Can't copy old log file!" fi -verbose "Dumping SQLite call databse ..." -sqlite3 "$call_db" "select * from call;" >>"$CALL_TMP" +for f in $call_db; do + verbose "Dumping SQLite call databse \"$f\" ..." + sqlite3 "$f" "select * from call;" >>"$CALL_TMP" +done verbose "Sorting plain ASCII call log ..." sort -u "$CALL_TMP" >"$CALL_LOG" rm -f "$CALL_TMP"