Commit 3442e0e1 authored by Michael Ott's avatar Michael Ott
Browse files

Added -t parameter to dcdbplot to keep temp files

parent f45d1bf0
......@@ -6,6 +6,7 @@ INFILETMP=0
ZEROOFFSET=0
SMOOTH=""
CLEANTEMP=1
if [ "$#" -ge "1" ]; then
while [ "${1:0:1}" == "-" ]; do
......@@ -16,6 +17,8 @@ if [ "$#" -ge "1" ]; then
;;
z) ZEROOFFSET=1
;;
t) CLEANTEMP=0
;;
*) echo "Unknown Parameter $1"
;;
esac
......@@ -34,6 +37,7 @@ if [ -t 0 ]; then
echo " -b Smooth graph with Bezier curves"
echo " -c Smooth graph with csplines"
echo " -z Start y-axis at 0"
echo " -t Don't clean temporary files"
exit
fi
INFILE=$1
......@@ -60,7 +64,7 @@ if [ ! -e $INFILE ]; then
fi
# Create tmp dir
TMP=`mktemp -d`
TMP=`mktemp --tmpdir -d dcdbplot.XXXXXX`
# Get length of file
L=`cat $INFILE | wc -l`
......@@ -165,7 +169,9 @@ else
fi
# Delete tmp dir
rm -rf $TMP
if [ "$INFILETMP" -gt "0" ]; then
if [ "$CLEANTEMP" == "1" ]; then
rm -rf $TMP
if [ "$INFILETMP" -gt "0" ]; then
rm $INFILE
fi
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment