diff options
author | rafa_99 <raroma09@gmail.com> | 2021-10-28 23:04:18 +0100 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2021-10-28 23:04:18 +0100 |
commit | d9b37d3ee4f069112fbffdeb38a4484f784844bf (patch) | |
tree | a4de38d5e98c222d0747d82fc77d2d0bde393a9f /scripts | |
parent | 972e2e57417a4df1d891997d5198a83b56d18d72 (diff) |
No more weird ways to extract files, 7z works on all of them
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/.local/bin/extract | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/scripts/.local/bin/extract b/scripts/.local/bin/extract deleted file mode 100755 index 616d391..0000000 --- a/scripts/.local/bin/extract +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# Setting Vars -FILE=$(basename "$1") -EXTENSION=$(echo "$FILE" | awk -F . '{if (NF>1) {print $NF}}') -BASE=$(basename "$FILE" ."$EXTENSION") - -# Select a command to execute depending on the inputted file -case "$EXTENSION" in - zip) - unzip "$FILE" - ;; - rar) - unar "$FILE" - ;; - 7z) - 7z x "$FILE" - ;; - tar.xz) - unxz "$FILE" && tar xpvf "$BASE".tar - ;; - tar.gz) - gunzip "$FILE" && tar xpvf "$BASE".tar - ;; - tar.bz2) - bzip2 -d "$FILE" && tar xpvf "$BASE".tar - ;; - tar) - tar xpvf "$FILE" - ;; - gz) - gunzip "$FILE" - ;; - xz) - unxz "$FILE" - ;; - bz2) - bzip2 -d "$FILE" - ;; - *) - echo "Unknown File Type :/" - ;; -esac |