Remove archive after extract fix.

This commit is contained in:
SuprDewd 2011-01-15 23:46:54 +00:00
commit 97cddd5538
2 changed files with 9 additions and 8 deletions

1
cache/DEBS_avail vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -39,12 +39,13 @@ function take() {
} }
function extract() { function extract() {
unset REMOVE_ARCHIVE unset REMOVE_ARCHIVE
if test "$1" = "-r"; then if test "$1" = "-r"; then
REMOVE=1 REMOVE_ARCHIVE=1
shift shift
fi fi
if [[ -f $1 ]]; then if [[ -f $1 ]]; then
case $1 in case $1 in
*.tar.bz2) tar xvjf $1;; *.tar.bz2) tar xvjf $1;;
@ -64,12 +65,11 @@ function extract() {
esac esac
if [[ $REMOVE_ARCHIVE -eq 1 ]]; then if [[ $REMOVE_ARCHIVE -eq 1 ]]; then
echo removing "$1"; echo removing "$1";
/bin/rm "$1"; /bin/rm "$1";
fi fi
else else
echo "'$1' is not a valid file" echo "'$1' is not a valid file"
fi fi
} }