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
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@g.o mailing list
|
|