summaryrefslogtreecommitdiff
path: root/scripts/mkipkg
authorschurig <schurig>2003-06-03 11:49:03 (UTC)
committer schurig <schurig>2003-06-03 11:49:03 (UTC)
commitaaf7709f64dda5a6cb81eeb96e421ba4189654d6 (patch) (side-by-side diff)
tree2571cb8ae66a1dbc323d813a148dbcb3012f390f /scripts/mkipkg
parent17b5bc4593ab0786f6488d452ae2430d6e4c46a5 (diff)
downloadopie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.zip
opie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.tar.gz
opie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.tar.bz2
remove $tempDir after an error
Diffstat (limited to 'scripts/mkipkg') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/mkipkg2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/mkipkg b/scripts/mkipkg
index 7877078..9c5e184 100755
--- a/scripts/mkipkg
+++ b/scripts/mkipkg
@@ -311,12 +311,13 @@ installScript()
}
tempDir=/tmp/`basename $self`.$$
mkdir -p $tempDir
if [ $? != 0 ]; then
echo "$self: cannot create $tempDir, exiting..."
+ rm -rf $tempDir
exit 1
fi
ctrldir=$tempDir/CONTROL
mkdir -p $ctrldir
@@ -328,12 +329,13 @@ else
fi
createFileList $ctrldir/control.new ipkgFileList
if [ "$?" != "0" ]; then
echo "$self: ERROR: missing files, not building $control"
+ rm -rf $tempDir
exit 1
fi
cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control
rm -f $ctrldir/control.new