diff options
Diffstat (limited to 'scripts/wipe-sysroot')
-rwxr-xr-x | scripts/wipe-sysroot | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot index e751a91e92..2d2cbeac8c 100755 --- a/scripts/wipe-sysroot +++ b/scripts/wipe-sysroot | |||
@@ -18,17 +18,27 @@ | |||
18 | # along with this program; if not, write to the Free Software | 18 | # along with this program; if not, write to the Free Software |
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | 20 | ||
21 | if [ -z "$BUILDDIR" ]; then | 21 | set -e |
22 | echo >&2 "Error: BUILDDIR is not defined, please initialise the build system." | 22 | |
23 | return 1 | 23 | ENVS=`mktemp --suffix -wipe-sysroot-envs` |
24 | bitbake -p -e > $ENVS | ||
25 | |||
26 | eval `grep -F SSTATE_MANIFESTS= $ENVS` | ||
27 | eval `grep -F STAGING_DIR= $ENVS` | ||
28 | eval `grep -F STAMPS_DIR= $ENVS` | ||
29 | rm -f $ENVS | ||
30 | |||
31 | 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" | ||
33 | exit 1 | ||
24 | fi | 34 | fi |
25 | 35 | ||
26 | # The sysroots themselves | 36 | # The sysroots themselves |
27 | rm -rf $BUILDDIR/tmp/sysroots/ | 37 | rm -rf "$STAGING_DIR" |
28 | 38 | ||
29 | # The stamps that said the sysroot was populated | 39 | # The stamps that said the sysroot was populated |
30 | rm -rf $BUILDDIR/tmp/stamps/*/*/*.do_populate_sysroot.* | 40 | rm -rf "$STAMPS_DIR/*/*/*.do_populate_sysroot.*" |
31 | rm -rf $BUILDDIR/tmp/stamps/*/*/*.do_populate_sysroot_setscene.* | 41 | rm -rf "$STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.*" |
32 | 42 | ||
33 | # The sstate manifests | 43 | # The sstate manifests |
34 | rm -rf $BUILDDIR/tmp/sstate-control/manifest-*.populate-sysroot | 44 | rm -rf "$SSTATE_MANIFESTS/manifest-*.populate-sysroot" |