1 #!/system/bin/sh 2 set -e 3 # Build a tarball out of a android environment which I can then 4 # upload to places for people who want to expedite the install 5 6 # This script runs on the device 7 8 spath=$( cd "$(dirname "$0")" ; pwd -P ) 9 cd $spath 10 11 ./device-umount-all 12 13 if [ ! -d debian ]; then echo "Error: environment to tar doesn't exist"; exit 1; fi 14 15 rm -rf debian-tar; cp -r debian debian-tar; 16 rm -rf debian/debian; mv debian-tar debian/debian 17 ./run-command "tar -zcf androdeb-fs.tgz --exclude='debian/kernel-headers' debian" 18 mv debian/androdeb-fs.tgz . 19 rm -rf debian/debian-tar 20