chaos/utils/menu
2025-06-23 23:24:43 -04:00

35 lines
468 B
Bash
Executable File

#!/bin/bash
# todo: why /usr/bin/env bash vs /bin/bash?
source "utils/print_img"
menu() {
clear
source $1
print_img $image
echo -ne "
$prompt
What will you do?
1) $choice1
2) $choice2
Choose 1 or 2: "
read -r ans
case $ans in
1)
eval "$outcome1"
;;
2)
eval "$outcome2"
;;
*)
echo "Wrong option."
exit 1
;;
esac
}