mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Remove archive after extract fix.
This commit is contained in:
parent
01b0366f3e
commit
97cddd5538
2 changed files with 9 additions and 8 deletions
1
cache/DEBS_avail
vendored
Normal file
1
cache/DEBS_avail
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue