x

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e2a7b3f4e2332e81eeefac8a9a900eabfee310bd
parent 1416ef3cd8b9ea948441cf6e250b07ad540fc89c
Author: MichaelDim02 <31562759+MichaelDim02@users.noreply.github.com>
Date:   Tue,  6 Jul 2021 22:30:47 +0300

Add files via upload
Diffstat:
Ax.sh | 26++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)

diff --git a/x.sh b/x.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# extractor script +# by Michael Constantine Dimopoulos +# Website: https://mcdim.xyz +# Email: mk@mcdim.xyz + +ext=$( echo $1 | cut -d . -f2- ) +bn=$( echo $1 | cut -d . -f1 ) + +if [ "$ext" = "zip" ]; then unzip "$1"; +elif [ "$ext" = "gz" ]; then gzip -d "$1"; +elif [ "$ext" = "tar" ]; then tar xzf "$1"; +elif [ "$ext" = "tar.gz" ]; then tar xzf "$1"; +elif [ "$ext" = "7zip" ]; then 7za e "$1"; +elif [ "$ext" = "7z" ]; then 7za e "$1"; +elif [ "$ext" = "bzip2" ]; then bzip2 -d "$1"; +elif [ "$ext" = "rar" ]; then unrar x "$1"; +elif [ "$ext" = "Z" ]; then uncompress "$1"; +elif [ "$ext" = "lzma" ]; then lzma -d --stdout "$1" >"$bn"; +elif [ "$ext" = "xz" ]; then xz -d "$1"; +elif [ "$ext" = "shar" ]; then unshar "$1"; +elif [ "$ext" = "cpio" ]; then cpio -idv <"$1"; +elif [ "$ext" = "a" ]; then ar -xv "$1"; +elif [ "$ext" = "kgb" ]; then kgb x "$1"; +fi