Commit 70d19c7c authored by Richard Torenvliet's avatar Richard Torenvliet

Removed the prefix of tar to determine the extraction method

parent ddfcdc0a
...@@ -40,15 +40,14 @@ function extract() { ...@@ -40,15 +40,14 @@ function extract() {
if [ -f $ARCHIVE ] ; then if [ -f $ARCHIVE ] ; then
case $ARCHIVE in case $ARCHIVE in
*.tar.bz2) tar xvjf $ARCHIVE -C $OUTPUT;; *.bz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tar.gz) tar xvzf $ARCHIVE -C $OUTPUT;; *.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.gz) tar xvzf $ARCHIVE -C $OUTPUT;; *.tgz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.rar) unrar x $ARCHIVE $OUTPUT ;; *.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tar) tar xvf $ARCHIVE -C $OUTPUT;; *.rar) unrar x $ARCHIVE $OUTPUT;;
*.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;; *.tar) tar xvf $ARCHIVE -C $OUTPUT;;
*.tgz) tar xvzf $ARCHIVE -C $OUTPUT;; *.zip) unzip $ARCHIVE -d $OUTPUT;;
*.zip) unzip $ARCHIVE -d $OUTPUT;; *) echo "'$ARCHIVE' cannot be extracted via >extract<"
*) echo "'$ARCHIVE' cannot be extracted via >extract<" && exit 1;;
esac esac
else else
echo "'$ARCHIVE' is not a valid file $OUTPUT, continueing" echo "'$ARCHIVE' is not a valid file $OUTPUT, continueing"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment