This is an automated email from the git hooks/post-receive script.
bernie.ogden pushed a commit to branch bernie/fs in repository toolchain/abe.
commit b9d567381265f62d7785d53dc33a52a15f542146 Author: Bernard Ogden bernie.ogden@linaro.org Date: Wed Jul 29 16:20:29 2015 +0200
Allow selection of what to produce
The tarball, the chroot or (by default) both.
Change-Id: I9e75219a5a87b2a64ddd7f10ac3faa3da2ae3273 --- config/bench/fs/makefs.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/config/bench/fs/makefs.sh b/config/bench/fs/makefs.sh index 80b6632..6367edf 100755 --- a/config/bench/fs/makefs.sh +++ b/config/bench/fs/makefs.sh @@ -25,19 +25,32 @@ if test $? -ne 0; then exit 1 fi
-export nosudo=${1:-} +make_tarball=1 #create a tarball? +make_chroot=1 #create a chroot (from the tarball)? +while getopts TC flag; do + case "${flag}" in + T) make_tarball=0;; + C) make_chroot=0;; + esac +done
function derivevars { echo ${arch:?Must give arch} > /dev/null echo ${label:?Must give label} > /dev/null extras="${include}${extras:+,${extras}}" outdir="${label}-${suite}-${variant:+${variant}-}${arch}-${stamp}-${hash}" - tarball="${outdir}.tar.gz" - if test -e "${outdir}"; then - echo "${outdir} already exists" >&2 - exit 1 + tarball="${outdir}.tgz" #debootstrap insists on .tar or .tgz + if test ${make_chroot} -ne 0; then + if test -e "${outdir}"; then + echo "${outdir} already exists" >&2 + exit 1 + fi + if ! test -e ${tarball}; then + echo "${tarball} does not exist, cannot generate chroot" >&2 + exit 1 + fi fi - if test -e "${tarball}"; then + if test ${make_tarball} -ne 0 && test -e "${tarball}"; then echo "${tarball} already exists" >&2 exit 1 fi @@ -51,6 +64,7 @@ function derivevars { }
function gentar { + if test ${make_tarball} -eq 0; then return 0; fi /usr/sbin/debootstrap --make-tarball="${tarball}" \ ${variant:+--variant="${variant}"} \ --include="${extras}" \ @@ -59,7 +73,7 @@ function gentar { }
function genrootfs { - if test x"${nosudo}" != x; then return 0; fi + if test ${make_chroot} -eq 0; then return 0; fi
#This command sets a mirror just in case we need to get anything #from the net - but, IIUC, it should not be used.