From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1I6RVg-0003oG-IE for garchives@archives.gentoo.org; Thu, 05 Jul 2007 13:36:41 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l65DacAJ003213; Thu, 5 Jul 2007 13:36:38 GMT Received: from mail.bawue.net (phoenix.bawue.net [193.7.176.60]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l65DaboF003197 for ; Thu, 5 Jul 2007 13:36:37 GMT Received: from my.bawue.net (imap.bawue.net [193.7.176.64]) by mail.bawue.net (Postfix) with ESMTP id C1477B9DB7 for ; Thu, 5 Jul 2007 15:11:30 +0200 (CEST) Received: from 130.230.11.107 (SquirrelMail authenticated user stoile) by my.bawue.net with HTTP; Thu, 5 Jul 2007 16:11:30 +0300 (EEST) Message-ID: <51440.130.230.11.107.1183641090.squirrel@my.bawue.net> In-Reply-To: <59506.130.230.11.107.1183640031.squirrel@my.bawue.net> References: <59506.130.230.11.107.1183640031.squirrel@my.bawue.net> Date: Thu, 5 Jul 2007 16:11:30 +0300 (EEST) Subject: [gnap-dev] 09-cleanup-gnap_make.patch From: "Philipp Riegger" To: gnap-dev@lists.gentoo.org User-Agent: SquirrelMail/1.4.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo GNAP development X-BeenThere: gnap-dev@gentoo.org Reply-to: gnap-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Archives-Salt: 76030c07-4426-4211-9758-fa9dcd50f146 X-Archives-Hash: 461b9a10790936e179737998bbd7e00a Index: src/gnap_make =================================================================== --- src/gnap_make (revision 81) +++ src/gnap_make (working copy) @@ -29,7 +29,6 @@ # Read options NOTARGET=1 -ALLTARGET=0 STAGE3=0 LIVECD1=0 LIVECD2=0 @@ -47,7 +46,13 @@ v ) GNAP_STAMP="${OPTARG}";; t ) case "${OPTARG}" in - all ) ALLTARGET=1;; + all ) + STAGE3=1 + LIVECD1=1 + LIVECD2=1 + TARBALL=1 + MODULES=1 + NEEDS_SNAPSHOT=1;; stage3 ) STAGE3=1 NEEDS_SNAPSHOT=1;; @@ -57,10 +62,13 @@ livecd-stage2 ) LIVECD2=1 NEEDS_SNAPSHOT=1;; - tarball ) TARBALL=1;; + tarball ) + TARBALL=1;; extensions ) MODULES=1 NEEDS_SNAPSHOT=1;; + * ) + gtest 1 'Specified stage unknown !';; esac NOTARGET=0;; f ) FORCEYES=1;; @@ -107,27 +115,14 @@ gtest continued $? "${GNAP_CATALYST_CONF} file not found !" source "${GNAP_CATALYST_CONF}" -# Default targets is complete core build -if [[ "${ALLTARGET}" -eq 1 ]]; then - STAGE3=1 - LIVECD1=1 - LIVECD2=1 - TARBALL=1 - MODULES=1 - NEEDS_SNAPSHOT=1 -fi - # At least one target is needed test "${NOTARGET}" -eq 0 gtest continued $? \ 'No target specified. You should provide at least one -t option.' # CATALYST_DIR must exist -if [[ ! -d "${CATALYST_DIR}" ]]; then - mkdir "${CATALYST_DIR}" - gtest continued $? \ - "Error: failed to create ${CATALYST_DIR} directory." -fi +mkdir -p "${CATALYST_DIR}" +gtest continued $? "Error: failed to create ${CATALYST_DIR} directory." # Stage3 needs a seed stage if [[ "${STAGE3}" -eq 1 ]]; then @@ -146,7 +141,6 @@ test -f "${GNAP_STAGE3FILE}" gtest continued $? "${GNAP_STAGE3FILE} is not a valid stage3 tarball" fi -gtest 0 # If extensions and no stage3, warn that we'll use seedstage as stage3 STAGE3LOC="${CATALYST_DIR}/builds/${RELTYPE}/stage3-${SUBARCH}-${GNAP_STAMP}.tar.bz2" @@ -154,9 +148,9 @@ if [[ "${STAGE3}" -ne 1 && ! -f "${STAGE3LOC}" ]]; then gwarn '"livecd-stage1" or "extensions" was selected without "stage3".' gconfirm 'Should I use the seed stage as stage3 result ?' - if [[ ! -d "${CATALYST_DIR}/builds/${RELTYPE}" ]]; then - mkdir -p "${CATALYST_DIR}/builds/${RELTYPE}" - fi + mkdir -p "${CATALYST_DIR}/builds/${RELTYPE}" + gtest continued $? \ + "Error: failed to create ${CATALYST_DIR}/builds/${RELTYPE} directory." cp "${GNAP_STAGE3FILE}" "${STAGE3LOC}" fi fi @@ -194,8 +188,7 @@ if [[ -f "${GNAP_LOGPREFIX}.out" || -f "${GNAP_LOGPREFIX}.err" ]]; then if [[ "${FORCEYES}" -ne 1 ]]; then - read -ep \ - " ${W}*${N} Logfile(s) already exists. Append/Overwrite [A]: " \ + read -ep " ${W}*${N} Logfile(s) already exists. Append/Overwrite [A]: " \ answer if [[ "${answer}" == 'o' || "${answer}" == 'O' ]]; then rm "${GNAP_LOGPREFIX}.out" "${GNAP_LOGPREFIX}.err" @@ -210,9 +203,7 @@ if [[ "${NEEDS_SNAPSHOT}" -eq 1 ]]; then gbegin 'Preparing portage snapshot' - if [[ ! -d "${CATALYST_DIR}/snapshots" ]]; then - mkdir -p "${CATALYST_DIR}/snapshots" - fi + mkdir -p "${CATALYST_DIR}/snapshots" if [[ -z "${GNAP_PORTAGE_OVERLAYS}" ]]; then cp "${GNAP_SNAPSHOTFILE}" "${CATALYST_DIR}/snapshots/portage-${GNAP_STAMP}.tar.bz2" -- gnap-dev@gentoo.org mailing list