]> code.ossystems Code Review - openembedded-core.git/commitdiff
wipe-sysroot: explain what is being deleted, and check for arguments
authorRoss Burton <ross.burton@intel.com>
Mon, 23 Dec 2013 13:51:23 +0000 (13:51 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jan 2014 13:01:20 +0000 (13:01 +0000)
Print the directories that will be deleted, and add a rudimentary check for
arguments and display a message if arguments were passed.

[ YOCTO #5423 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/wipe-sysroot

index 7ca26fe75007cc4feafd80c776e4f8ca05452c6b..c22d39a405946fab8eff8782c39682354bc2c3de 100755 (executable)
 
 set -e
 
+if [ $# -gt 0 ]; then
+    echo "Wipe all sysroots and sysroot-related stamps for the current build directory." >&2
+    echo "Usage: $0" >&2
+    exit 1
+fi
+
 ENVS=`mktemp --suffix -wipe-sysroot-envs`
 bitbake -p -e > $ENVS
 
@@ -29,10 +35,12 @@ eval `grep -F STAMPS_DIR= $ENVS`
 rm -f $ENVS
 
 if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then
-    echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR, check above for errors"
+    echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR from bitbake, check above for errors"
     exit 1
 fi
 
+echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR."
+
 # The sysroots themselves
 rm -rf $STAGING_DIR