The whole process of finding and copying APKs can be very verbose, so turn
of the bash verbose logging during that process.
#!/bin/bash
-set -e
-set -x
+set -e # quit script on error
+set -x # show each command as it is executed
echo_header() {
echo "=============================================================================="
}
copy_apks_into_repo() {
+ set +x
for f in `find $APKDIR -name '*.apk' | grep -F -v -e unaligned -e unsigned`; do
name=$(basename $(dirname `dirname $f`))
apk=`aapt dump badging "$f" | sed -n "s,^package: name='\(.*\)' versionCode='\([0-9][0-9]*\)' .*,\1_\2.apk,p"`
rsync -axv $f $1/repo/$apk # rsync if hard link is not possible
fi
done
+ set -x
}
create_fake_android_home() {