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] 05-festure-gnap_overlay-T.patch
Date: Thu, 5 Jul 2007 16:07:31 +0300 (EEST)	[thread overview]
Message-ID: <44054.130.230.11.107.1183640851.squirrel@my.bawue.net> (raw)
In-Reply-To: <59506.130.230.11.107.1183640031.squirrel@my.bawue.net>

Index: tools/gnap_overlay
===================================================================
--- tools/gnap_overlay	(revision 58)
+++ tools/gnap_overlay	(revision 60)
@@ -13,26 +13,27 @@
     echo "  ${GNAPNAME} -d hostdisk -r rootdev -o overlay [ options ]"
     echo
     echo 'Common options:'
-    echo '  -o overlay    Overlay directory or tbz2 file'
-    echo '  -c conf       overlay.conf file to use (if not in overlays)'
-    echo '  -g gnap_core  Use specific GNAP core tarball file'
-    echo '  -n            Do not use the GNAP castle logo'
-    echo '  -f            Force all answers to yes (dangerous!)'
+    echo '  -o overlay       Overlay directory or tbz2 file'
+    echo '  -c conf          overlay.conf file to use (if not in overlays)'
+    echo '  -g gnap_core     Use specific GNAP core tarball file'
+    echo '  -n               Do not use the GNAP castle logo'
+    echo '  -f               Force all answers to yes (dangerous!)'
+	echo '  -T gnap_tempdir  Use given temp dir'
     echo
     echo 'Options for ISO target (create an ISO containing bootable CD):'
-    echo '  -i isoname    Customized LiveCD ISO output file name'
+    echo '  -i isoname       Customized LiveCD ISO output file name'
     echo
     echo 'Options for disk target (install to a disk plugged in system):'
-    echo '  -d hostdisk   Disk to install to, as seen on current host'
-    echo '  -r rootdev    Boot device name as seen from target system'
-    echo '  -m            Cache filesystem in memory to reduce media wear'
-    echo '  -s            Use serial console on ttyS0'
+    echo '  -d hostdisk      Disk to install to, as seen on current host'
+    echo '  -r rootdev       Boot device name as seen from target system'
+    echo '  -m               Cache filesystem in memory to reduce media
wear'
+    echo '  -s               Use serial console on ttyS0'
     echo
     echo 'Options for image target (install into a disk image):'
-    echo '  -l image      Use existing image file as output'
-    echo '                Warning: only one partition is supported!'
-    echo '  -L image      Create image file and use it as output'
-    echo '  -S size       Size of image file in megabyte'
+    echo '  -l image         Use existing image file as output'
+    echo '                   Warning: only one partition is supported!'
+    echo '  -L image         Create image file and use it as output'
+    echo '  -S size          Size of image file in megabyte'
     echo '  The disk target options also apply, except -d.'
     echo
     echo "Please man ${GNAPNAME} for more details."
@@ -46,7 +47,8 @@
 gbegin 'Checking parameters'

 # Read options
-while getopts ':hg:o:c:nfi:d:l:r:ms:S:L:' options; do
+TEMPDIR=''
+while getopts ':hg:o:c:nfi:d:l:r:ms:S:L:T:' options; do
 	case ${options} in
 		h ) usage
 			exit 0;;
@@ -70,6 +72,7 @@
 		m ) CACHE='docache ';;
 		s ) SERIAL="console=ttyS0,${OPTARG}n81"
 			BAUDRATE="${OPTARG}";;
+		T ) TEMPDIR="${OPTARG}";;
 		* ) gtest 1 'Specified options are incomplete or unknown !';;
 	esac
 done
@@ -116,10 +119,19 @@
 	gconfirm 'Are you sure you want to continue ?'
 fi

+# Setting up temporary directory
+if [[ "${TEMPDIR}" = "" ]]; then
+	TEMPDIR=$(mktemp -d -t gnap_overlay.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
+
 # Common actions
 gbegin "Expanding ${GNAPCORE} core"
-TEMPDIR=$(mktemp -d -t gnap_overlay.XXXXXX)
-gtest continued $? 'Failed to create temporary directory'
 TEMPCOREDIR="${TEMPDIR}/core"
 mkdir "${TEMPCOREDIR}"
 gtest continued $? 'Failed to create core temporary subdirectory'

-- 
gnap-dev@gentoo.org mailing list



  parent reply	other threads:[~2007-07-05 13:07 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 ` Philipp Riegger [this message]
2007-07-05 13:08 ` [gnap-dev] 06-feature-gnap_remaster-T.patch Philipp Riegger
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=44054.130.230.11.107.1183640851.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