summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryukamish <[email protected]>2026-07-22 23:58:22 +0530
committerryukamish <[email protected]>2026-07-22 23:58:22 +0530
commit48b96aed850bb8f560f2c7cf449413514d4c945e (patch)
treeb9dcbec4210461b85d8db50f953891da40cdc3d7
parentbff9bfcc4c01462ab7d9cc289e2836c00fdd8bbe (diff)
add: usage and dependency check
-rwxr-xr-xcompress20
1 files changed, 20 insertions, 0 deletions
diff --git a/compress b/compress
index f1f641a..547a4ba 100755
--- a/compress
+++ b/compress
@@ -1 +1,21 @@
#!/usr/bin/env bash
+
+#usage
+usage(){
+ echo "Usage: compress <file1> <file2> ..."
+}
+
+#check for dependencies
+_check_deps(){
+ deps=(
+ tar
+ gpg
+ )
+ for dep in "${deps[@]}";
+ do
+ if ! command -v "${deps[@]}" &>/dev/null; then
+ echo "Error: $dep not found. Install $dep first."
+ exit 1
+ fi
+ done
+}