public inbox for gnap-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Philipp Riegger" <lists@anderedomain.de>
To: gnap-dev@lists.gentoo.org
Subject: [gnap-dev] 06-feature-gnap_remaster-T.patch
Date: Thu, 5 Jul 2007 16:08:19 +0300 (EEST)	[thread overview]
Message-ID: <44062.130.230.11.107.1183640899.squirrel@my.bawue.net> (raw)
In-Reply-To: <59506.130.230.11.107.1183640031.squirrel@my.bawue.net>

Index: tools/gnap_remaster
===================================================================
--- tools/gnap_remaster	(revision 55)
+++ tools/gnap_remaster	(working copy)
@@ -20,6 +20,7 @@
 	echo '  -b basefs       basefs.tar.bz2 file to use as base'
 	echo '  -d extdir       Directory where to find extensions'
 	echo '  -f              Force all answers to yes (dangerous !)'
+	echo '  -T gnap_tempdir Use given temp dir'
 	echo
 	echo "Please man ${GNAPNAME} for more details."
 }
@@ -32,7 +33,8 @@
 gbegin 'Checking parameters'

 # Read options
-while getopts ':he:k:m:o:g:b:d:f' options; do
+TEMPDIR=''
+while getopts ':he:k:m:o:g:b:d:fT:' options; do
 	case ${options} in
 		h ) usage
 			exit 0;;
@@ -44,6 +46,7 @@
 		b ) GNAPBASEFS="${OPTARG}";;
 		d ) GNAPEXTDIR="${OPTARG}";;
 		f ) FORCEYES=1;;
+		T ) TEMPDIR="${OPTARG}";;
 		* ) gtest 1 'Specified options are incomplete or unknown !';;
 	esac
 done
@@ -69,10 +72,19 @@
 	gconfirm "${OUTPUT} already exists, overwrite"
 fi

+# Setting up temporary directory
+if [[ "${TEMPDIR}" = "" ]]; then
+	TEMPDIR=$(mktemp -d -t gnap_remaster.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
+
 # Preparing new FS
 gbegin "Unpacking ${GNAPBASEFS} basefs"
-TEMPDIR=$(mktemp -d -t gnap_remaster.XXXXXX)
-gtest continued $? 'Failed to create temporary directory'
 TEMPOVERDIR="${TEMPDIR}/basefs"
 mkdir "${TEMPOVERDIR}"
 gtest continued $? 'Failed to create basefs temporary subdirectory'

-- 
gnap-dev@gentoo.org mailing list



  parent reply	other threads:[~2007-07-05 13:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 12:53 [gnap-dev] Some patches for gnap Philipp Riegger
2007-07-05 13:03 ` [gnap-dev] 01-split-gnap_make.patch Philipp Riegger
2007-07-05 13:05 ` [gnap-dev] 03-split-gnap_remaster.patch Philipp Riegger
2007-07-05 13:06 ` [gnap-dev] 04-feature-gnap_make-T.patch Philipp Riegger
2007-07-05 13:07 ` [gnap-dev] 05-festure-gnap_overlay-T.patch Philipp Riegger
2007-07-05 13:08 ` Philipp Riegger [this message]
2007-07-05 13:09 ` [gnap-dev] 07-split-make_tempdir.patch Philipp Riegger
2007-07-05 13:10 ` [gnap-dev] 08-namespace-gnap_shared.patch Philipp Riegger
2007-07-05 13:11 ` [gnap-dev] 09-cleanup-gnap_make.patch Philipp Riegger
2007-07-06  7:40 ` [gnap-dev] Some patches for gnap josé Alberto Suárez López
2007-07-06 15:08   ` Philipp Riegger
2007-07-09  7:13     ` josé Alberto Suárez López
2007-07-12 23:49     ` Philipp Riegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44062.130.230.11.107.1183640899.squirrel@my.bawue.net \
    --to=lists@anderedomain.de \
    --cc=gnap-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox