blob: 14ba2584c6bad83ce044d7b49a63c3158530ab4d [file] [log] [blame]
set -e
# Script to do unpack of rootfs, ensures proper tear down
# of existing environment. Expects debian rootfs in
# /data/deb.tar.gz which it will delete after successful
# unpack of rootfs.
spath=$( cd "$(dirname "$0")" ; pwd -P )
if [ ! -f /data/androdeb/deb.tar.gz ]; then
echo "Debian rootfs tar doesn't existing at /data/deb.tar.gz"
echo "Run androdeb with device connected first"
exit 1
if [ -d /data/androdeb/debian ]; then
echo "androdeb environment already exists, doing a tear down"
rm -rf /data/androdeb/debian
tar -zxf /data/androdeb/deb.tar.gz -C /data/androdeb/ || die 2 "Couldn't unpack due to tar -x errors"
rm /data/androdeb/deb.tar.gz
echo "Unpack of rootfs successful!"