diff options
| author | ryukamish <[email protected]> | 2026-07-22 23:58:22 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-07-22 23:58:22 +0530 |
| commit | 48b96aed850bb8f560f2c7cf449413514d4c945e (patch) | |
| tree | b9dcbec4210461b85d8db50f953891da40cdc3d7 /compress | |
| parent | bff9bfcc4c01462ab7d9cc289e2836c00fdd8bbe (diff) | |
add: usage and dependency check
Diffstat (limited to 'compress')
| -rwxr-xr-x | compress | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 +} |
