diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:38:32 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:50:20 +0100 |
commit | e2e6f6fe07049f33cb6348780fa975162752e421 (patch) | |
tree | b1813295411235d1297a0ed642b1346b24fdfb12 /scripts/wipe-sysroot | |
download | poky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz |
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'scripts/wipe-sysroot')
-rwxr-xr-x | scripts/wipe-sysroot | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot new file mode 100755 index 0000000000..7ca26fe750 --- /dev/null +++ b/scripts/wipe-sysroot | |||
@@ -0,0 +1,46 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # Wipe out all of the sysroots and all of the stamps that populated it. | ||
4 | # Author: Ross Burton <ross.burton@intel.com> | ||
5 | # | ||
6 | # Copyright (c) 2012 Intel Corporation | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
15 | # See the GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
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 | ||
20 | |||
21 | set -e | ||
22 | |||
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 | ||
34 | fi | ||
35 | |||
36 | # The sysroots themselves | ||
37 | rm -rf $STAGING_DIR | ||
38 | |||
39 | # The stamps that said the sysroot was populated | ||
40 | rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot.* | ||
41 | rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.* | ||
42 | rm -rf $STAMPS_DIR/*/*/*.do_packagedata.* | ||
43 | rm -rf $STAMPS_DIR/*/*/*.do_packagedata_setscene.* | ||
44 | |||
45 | # The sstate manifests | ||
46 | rm -rf $SSTATE_MANIFESTS/manifest-*.populate-sysroot | ||