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 <gnap-dev+bounces-30-garchives=archives.gentoo.org@gentoo.org>) id 1I6R2x-0003qa-IH for garchives@archives.gentoo.org; Thu, 05 Jul 2007 13:07:00 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l65D6vIQ006902; Thu, 5 Jul 2007 13:06:57 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 l65D6uag006882 for <gnap-dev@lists.gentoo.org>; Thu, 5 Jul 2007 13:06:56 GMT Received: from my.bawue.net (imap.bawue.net [193.7.176.64]) by mail.bawue.net (Postfix) with ESMTP id 58D0DB96B4 for <gnap-dev@lists.gentoo.org>; Thu, 5 Jul 2007 15:06:39 +0200 (CEST) Received: from 130.230.11.107 (SquirrelMail authenticated user stoile) by my.bawue.net with HTTP; Thu, 5 Jul 2007 16:06:39 +0300 (EEST) Message-ID: <44048.130.230.11.107.1183640799.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:06:39 +0300 (EEST) Subject: [gnap-dev] 04-feature-gnap_make-T.patch From: "Philipp Riegger" <lists@anderedomain.de> To: gnap-dev@lists.gentoo.org User-Agent: SquirrelMail/1.4.2 Precedence: bulk List-Post: <mailto:gnap-dev@lists.gentoo.org> List-Help: <mailto:gnap-dev+help@gentoo.org> List-Unsubscribe: <mailto:gnap-dev+unsubscribe@gentoo.org> List-Subscribe: <mailto:gnap-dev+subscribe@gentoo.org> List-Id: Gentoo GNAP development <gnap-dev.gentoo.org> 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: f1feed94-eeb0-4da2-acda-9b69cf9c8d7d X-Archives-Hash: 7ff38b2faa0759246485993da2888aa2 Index: src/gnap_make =================================================================== --- src/gnap_make (revision 55) +++ src/gnap_make (revision 57) @@ -15,6 +15,7 @@ echo ' -l logfile Use specific log file prefix' echo ' -c catalyst.conf Use specific catalyst.conf file' echo ' -e specs Specs directory or tar.bz2 file' + echo ' -T gnap_tempdir Use given temp dir' echo echo "Please man ${GNAPNAME} for more details." } @@ -29,7 +30,8 @@ # Read options NOTARGET=1 STAMP=$(date +%Y%m%d) -while getopts ':hs:p:m:o:v:t:fl:c:e:' options; do +TEMPDIR='' +while getopts ':hs:p:m:o:v:t:fl:c:e:T:' options; do case ${options} in h ) usage exit 0;; @@ -59,6 +61,7 @@ l ) GNAPLOGPREFIX="${OPTARG}";; c ) CATALYST_CONF="${OPTARG}";; e ) SPECS="${OPTARG}";; + T ) TEMPDIR="${OPTARG}";; * ) gtest 1 'Specified options are incomplete or unknown !';; esac done @@ -68,8 +71,15 @@ gtest continued $? "You need to be root to run ${GNAPNAME}" # Setting up temporary directory -TEMPDIR=$(mktemp -d -t gnap_make.XXXXXX) -gtest continued $? 'Failed to create temporary directory' +if [[ "${TEMPDIR}" = "" ]]; then + TEMPDIR=$(mktemp -d -t gnap_make.XXXXXX) + gtest continued $? 'Failed to create temporary directory' +elif [[ -d "${TEMPDIR}" ]] + gconfirm "${TEMPDIR} already exists. Continue?" +else + mkdir -p "${TEMPDIR}" + gtest continued $? "Failed to create ${TEMPDIR}" +fi # Prepare specs dir and check common.conf file SPECDIR="${TEMPDIR}/specs" -- gnap-dev@gentoo.org mailing list