All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wipe-sysroot: explain what is being deleted, and check for arguments
@ 2013-12-23 13:51 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2013-12-23 13:51 UTC (permalink / raw
  To: openembedded-core

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>
---
 scripts/wipe-sysroot |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot
index 7ca26fe..c22d39a 100755
--- a/scripts/wipe-sysroot
+++ b/scripts/wipe-sysroot
@@ -20,6 +20,12 @@
 
 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
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-23 13:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 13:51 [PATCH] wipe-sysroot: explain what is being deleted, and check for arguments Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.