author | schurig <schurig> | 2003-06-03 11:49:03 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-03 11:49:03 (UTC) |
commit | aaf7709f64dda5a6cb81eeb96e421ba4189654d6 (patch) (unidiff) | |
tree | 2571cb8ae66a1dbc323d813a148dbcb3012f390f | |
parent | 17b5bc4593ab0786f6488d452ae2430d6e4c46a5 (diff) | |
download | opie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.zip opie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.tar.gz opie-aaf7709f64dda5a6cb81eeb96e421ba4189654d6.tar.bz2 |
remove $tempDir after an error
-rwxr-xr-x | scripts/mkipkg | 2 |
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() | |||
311 | } | 311 | } |
312 | 312 | ||
313 | tempDir=/tmp/`basename $self`.$$ | 313 | tempDir=/tmp/`basename $self`.$$ |
314 | mkdir -p $tempDir | 314 | mkdir -p $tempDir |
315 | if [ $? != 0 ]; then | 315 | if [ $? != 0 ]; then |
316 | echo "$self: cannot create $tempDir, exiting..." | 316 | echo "$self: cannot create $tempDir, exiting..." |
317 | rm -rf $tempDir | ||
317 | exit 1 | 318 | exit 1 |
318 | fi | 319 | fi |
319 | 320 | ||
320 | ctrldir=$tempDir/CONTROL | 321 | ctrldir=$tempDir/CONTROL |
321 | 322 | ||
322 | mkdir -p $ctrldir | 323 | mkdir -p $ctrldir |
@@ -328,12 +329,13 @@ else | |||
328 | fi | 329 | fi |
329 | 330 | ||
330 | createFileList $ctrldir/control.new ipkgFileList | 331 | createFileList $ctrldir/control.new ipkgFileList |
331 | 332 | ||
332 | if [ "$?" != "0" ]; then | 333 | if [ "$?" != "0" ]; then |
333 | echo "$self: ERROR: missing files, not building $control" | 334 | echo "$self: ERROR: missing files, not building $control" |
335 | rm -rf $tempDir | ||
334 | exit 1 | 336 | exit 1 |
335 | fi | 337 | fi |
336 | 338 | ||
337 | 339 | ||
338 | cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control | 340 | cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control |
339 | rm -f $ctrldir/control.new | 341 | rm -f $ctrldir/control.new |