Mercurial > hg > aboriginal
comparison sources/native-builds/bootstrap-skeleton/control-image-wrapper.sh @ 1258:c264495fbf21
Update the common code, use "files" directory instead of build for subdir.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 07 Oct 2010 23:50:12 -0500 |
parents | df70740df1a5 |
children | b41dbea3ba14 |
comparison
equal
deleted
inserted
replaced
1257:1461d20bb6a7 | 1258:c264495fbf21 |
---|---|
10 [ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 | 10 [ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 |
11 [ "$1" != "/dev/null" ] && [ -e "$1" ] && echo "$1" exists && exit 0 | 11 [ "$1" != "/dev/null" ] && [ -e "$1" ] && echo "$1" exists && exit 0 |
12 | 12 |
13 # Find path to our working directory. | 13 # Find path to our working directory. |
14 | 14 |
15 MYDIR="$(dirname "$(readlink -f "$(which "$0")")")" | 15 MYDIR="$(readlink -f "$(dirname "$(which "$0")")")" |
16 IMAGENAME="${MYDIR/*\//}" | 16 IMAGENAME="${MYDIR/*\//}" |
17 | 17 |
18 # Use our own directories for downloaded source tarballs and patches. | 18 # Use our own directories for downloaded source tarballs and patches. |
19 # (We may have the same packages as the aboriginal build, but use different | 19 # (We may have the same packages as the aboriginal build, but use different |
20 # versions, and we don't want our cleanup_oldfiles to overlap.) | 20 # versions, and we don't want our cleanup_oldfiles to overlap.) |
25 # Include package cache in the control image, so the target system image can | 25 # Include package cache in the control image, so the target system image can |
26 # build from this source. | 26 # build from this source. |
27 | 27 |
28 WORK="$WORK/$IMAGENAME" && | 28 WORK="$WORK/$IMAGENAME" && |
29 blank_tempdir "$WORK" && | 29 blank_tempdir "$WORK" && |
30 SRCTREE="$WORK" && | 30 SRCTREE="$WORK/packages" && |
31 mkdir "$SRCTREE" && | |
32 | |
33 # Copy common infrastructure to target | |
34 | |
31 cp "$MYDIR"/../bootstrap-skeleton/files/* "$WORK" || exit 1 | 35 cp "$MYDIR"/../bootstrap-skeleton/files/* "$WORK" || exit 1 |
36 if [ -e "$MYDIR/mnt" ] | |
37 then | |
38 cp -a "$MYDIR/mnt/." "$WORK" || exit 1 | |
39 fi | |
40 | |
41 # Populate packages directory | |
32 | 42 |
33 echo "=== $IMAGENAME: Download/extract source code" | 43 echo "=== $IMAGENAME: Download/extract source code" |
34 | 44 |
35 EXTRACT_ALL=1 | 45 EXTRACT_ALL=1 |
36 | 46 |
37 "$MYDIR"/download.sh || exit 1 | 47 source "$MYDIR"/download.sh || exit 1 |
38 | 48 |
39 cleanup_oldfiles | 49 cleanup_oldfiles |
40 | |
41 if [ -e "$MYDIR/mnt" ] | |
42 then | |
43 cp -a "$MYDIR/mnt/." "$WORK" || exit 1 | |
44 fi | |
45 | 50 |
46 # Create sqaushfs image | 51 # Create sqaushfs image |
47 | 52 |
48 if [ "$1" != "/dev/null" ] | 53 if [ "$1" != "/dev/null" ] |
49 then | 54 then |