summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2021-10-28 23:04:18 +0100
committerrafa_99 <raroma09@gmail.com>2021-10-28 23:04:18 +0100
commitd9b37d3ee4f069112fbffdeb38a4484f784844bf (patch)
treea4de38d5e98c222d0747d82fc77d2d0bde393a9f /scripts
parent972e2e57417a4df1d891997d5198a83b56d18d72 (diff)
No more weird ways to extract files, 7z works on all of them
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.local/bin/extract43
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