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 6a8b708ce3423dbd74322683fc35dcc97ef14627 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 02df1d8..4f0827b 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_tarball} -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 @@ -49,6 +62,7 @@ function derivevars { }
function gentar { + if ${make_tarball} -eq 0; then return 0; fi /usr/sbin/debootstrap --make-tarball="${tarball}" \ ${variant:+--variant="${variant}"} \ --include="${extras}" \ @@ -57,7 +71,7 @@ function gentar { }
function genrootfs { - if test x"${nosudo}" != x; then return 0; fi + if ${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.