X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=deblob-main;h=7d8a29cd584f18b1c902be600017d9920997f1e0;hb=8c5aae46e60acd6e4765c04734640a8e6685dcdf;hp=bf1ac2062fd3c0b9408802c64ca71e87efbcf5a6;hpb=acad0151fa936f748e8c9b07ef3961d8f5e1d2f1;p=releases.git diff --git a/deblob-main b/deblob-main index bf1ac2062fd3..7d8a29cd584f 100755 --- a/deblob-main +++ b/deblob-main @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2008, 2009 Alexandre Oliva +# Copyright (C) 2008, 2009, 2010 Alexandre Oliva # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -93,6 +93,8 @@ else exit 1 fi +cleanup= + for f in \ linux-$kver-$libre.tar.bz2 \ linux-$kver-$libre.tar.bz2.asc \ @@ -112,6 +114,7 @@ for f in \ echo $f already exists >&2 exit 1 fi + cleanup="$cleanup $f" done for d in \ @@ -123,6 +126,7 @@ for d in \ echo $d already exists >&2 exit 1 fi + cleanup="$cleanup $d" done if test -f $dir/deblob-$kver; then @@ -149,7 +153,7 @@ else fi fi -trap "status=$?; echo cleaning up...; rm -rf orig-linux-$kver linux-$kver linux-$kver-$libre linux-$kver.tar linux-$kver-$libre.tar linux-$kver-$libre.tar.bz2 linux-$kver-$libre.patch linux-$kver-$libre.xdelta; (exit $status); exit" 0 1 2 15 +trap "status=$?; echo cleaning up...; rm -rf $cleanup; (exit $status); exit" 0 1 2 15 set -e @@ -157,7 +161,7 @@ echo Uncompressing linux-$kver.tar.bz2 into linux-$kver.tar rm -rf linux-$kver linux-$kver.tar bunzip2 < linux-$kver.tar.bz2 > linux-$kver.tar -echo Extracing linux-$kver.tar into linux-$kver +echo Extracting linux-$kver.tar into linux-$kver tar -xf linux-$kver.tar rm -rf linux-$kver-$libre linux-$kver-$libre.tar @@ -167,7 +171,7 @@ cp -lR linux-$kver/. linux-$kver-$libre rm -f linux-$kver-$libre.log linux-$kver-$libre.log.tmp echo Deblobbing within linux-$kver-$libre, saving output to linux-$kver-$libre.log -# We can't just pipe deblob into tee, for then we fail to detect +# We can't just pipe deblob into tee, for then we fail to detect # error conditions. Use file renaming to tell whether we succeeded. if (cd linux-$kver-$libre && /bin/sh ../$deblob $force) 2>&1; then mv linux-$kver-$libre.log.tmp linux-$kver-$libre.log