diff options
author | Ross Burton <ross.burton@intel.com> | 2013-12-23 13:51:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-02 13:08:40 +0000 |
commit | da9b4fa15c941d6e6dc841081707f21cd327023a (patch) | |
tree | 19a69cca623ff698bf60e2821099a2a31d40377e /scripts/wipe-sysroot | |
parent | 5165328cb4f493997f3c700e6bf14c1d7e55c958 (diff) | |
download | poky-da9b4fa15c941d6e6dc841081707f21cd327023a.tar.gz |
wipe-sysroot: explain what is being deleted, and check for arguments
Print the directories that will be deleted, and add a rudimentary check for
arguments and display a message if arguments were passed.
[ YOCTO #5423 ]
(From OE-Core rev: e46b00a6810eaed27a24495cacb19e565de59fec)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/wipe-sysroot')
-rwxr-xr-x | scripts/wipe-sysroot | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot index 7ca26fe750..c22d39a405 100755 --- a/scripts/wipe-sysroot +++ b/scripts/wipe-sysroot | |||
@@ -20,6 +20,12 @@ | |||
20 | 20 | ||
21 | set -e | 21 | set -e |
22 | 22 | ||
23 | if [ $# -gt 0 ]; then | ||
24 | echo "Wipe all sysroots and sysroot-related stamps for the current build directory." >&2 | ||
25 | echo "Usage: $0" >&2 | ||
26 | exit 1 | ||
27 | fi | ||
28 | |||
23 | ENVS=`mktemp --suffix -wipe-sysroot-envs` | 29 | ENVS=`mktemp --suffix -wipe-sysroot-envs` |
24 | bitbake -p -e > $ENVS | 30 | bitbake -p -e > $ENVS |
25 | 31 | ||
@@ -29,10 +35,12 @@ eval `grep -F STAMPS_DIR= $ENVS` | |||
29 | rm -f $ENVS | 35 | rm -f $ENVS |
30 | 36 | ||
31 | if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then | 37 | if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then |
32 | echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR, check above for errors" | 38 | echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR from bitbake, check above for errors" |
33 | exit 1 | 39 | exit 1 |
34 | fi | 40 | fi |
35 | 41 | ||
42 | echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR." | ||
43 | |||
36 | # The sysroots themselves | 44 | # The sysroots themselves |
37 | rm -rf $STAGING_DIR | 45 | rm -rf $STAGING_DIR |
38 | 46 | ||