diff options
author | Skiz <skiznet@aol.com> | 2024-11-15 16:31:09 -0500 |
---|---|---|
committer | Skiz <skiznet@aol.com> | 2024-11-15 16:31:09 -0500 |
commit | 4f47cd0c93cd8bb967524b53d4a0c634f08afe44 (patch) | |
tree | 01bc332a06e02e2b70f210d626535fb58e3de25a |
Created base file and function
-rwxr-xr-x | mediachad | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mediachad b/mediachad new file mode 100755 index 0000000..8bc2f50 --- /dev/null +++ b/mediachad @@ -0,0 +1,40 @@ +#!/bin/bash +# Nov 15 2024 + +# Functions + +# Program_Check, checks if you have a program or not. +# You can inset data via quotes: +# program_check "ytfzf" or program_check "mpv". +program_check(){ + +if type "$1" > /dev/null 2>&1; then + echo "You have $1" > /dev/null +else + echo "You don't have $1" + echo "Please install $1, to make this program work" + exit 1 +fi + +} + +#Yes or no function: +yes_or_no() { +read -r -p "Are you sure? [y/N] " response +case "$response" in + [yY][eE][sS]|[yY]) + #do_something + echo "Test 1"; + + ;; + *) + #do_something_else + + echo "Test 2"; + ;; +esac +} + +# Main() { + +# } |