From 84709d19932c50cb233ddfe470a8f3c599478b83 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Sat, 3 Sep 2022 02:53:37 -0700 Subject: [PATCH] :memo: Made notation on what to install for xtract script --- scripts/xtract | 30 ++++++++++++++++++++++++++++++ updates.txt | 6 ++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 scripts/xtract diff --git a/scripts/xtract b/scripts/xtract new file mode 100755 index 00000000..56bd9f3c --- /dev/null +++ b/scripts/xtract @@ -0,0 +1,30 @@ +#!/bin/sh + +# Error handling +set -e + +# For styling/colorizing output +txtbld=$(tput bold) +txtblue=${txtbld}$(tput setaf 4) +txtgreen=${txtbld}$(tput setaf 2) +txtred=${txtbld}$(tput setaf 1) +txtyellow=${txtbld}$(tput setaf 3) +txtwhite=${txtbld}$(tput setaf 7) + +# Intro Prompt +echo "${txtgreen}xtract: a simple shell script for decompressing common file formats" + +# Dependency check +# not to be used in actual program, encapsulate in function and use depending on which file is fed to xtract +dependencies=("tar" "zip" "bzip2" "gzip" "gunzip" "pax" "7z" "ar" "cpio" "brotli" "lzip" "rzip" "xz" "zstd") +numdependencies=14 +missingdependencies=0 +for ((i = 0; i < numdependencies; i++)) ; +do + if ! command -v "${dependencies[$i]}" &> /dev/null + then + echo "${txtred}dependency not met: ${dependencies[$i]}${txtwhite}" + missingdependencies=$((missingdependencies+1)) + fi +done + diff --git a/updates.txt b/updates.txt index 3a8334bd..6bd82738 100644 --- a/updates.txt +++ b/updates.txt @@ -25,6 +25,8 @@ Download and install in virtmanager Windows 10 iso (for purposes of software tes Use this site (microsoft only has .exe now... 64 bit, version 21H2) https://www.itechtics.com/windows-10-download-iso/ -Install pax file compressor/decompressor +Install various file compressors/decompressors -doas pacman -S pax +doas pacman -S pax lzip + +paru rzip