Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gnap-dev
Navigation:
Lists: gnap-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gnap-dev@g.o
From: "Philipp Riegger" <lists@...>
Subject: 04-feature-gnap_make-T.patch
Date: Thu, 5 Jul 2007 16:06:39 +0300 (EEST)
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@g.o mailing list


References:
Some patches for gnap
-- Philipp Riegger
Navigation:
Lists: gnap-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
03-split-gnap_remaster.patch
Next by thread:
05-festure-gnap_overlay-T.patch
Previous by date:
03-split-gnap_remaster.patch
Next by date:
05-festure-gnap_overlay-T.patch


Updated Jun 17, 2009

Summary: Archive of the gnap-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.