Files
Virtnet.bond/runner.sh
2025-12-04 03:07:48 +01:00

64 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
git_pull="${SCRIPT_DIR}/gitpull.sh"
git_push="${SCRIPT_DIR}/gitpush.sh"
git_log="${SCRIPT_DIR}/laravallog.sh"
git_cache="${SCRIPT_DIR}/laravalcache.sh"
divider="==============================================="
while true; do
clear
cat <<EOF
$divider
Paymenter Utility Runner
$divider
[1] Run gitpull.sh
[2] Run gitpush.sh
[3] Run laravallog.sh
[4] Run laravalcache.sh
[5] Exit
$divider
Select an option by pressing the number key.
EOF
read -n1 -s choice
echo
case "$choice" in
1)
[ -x "$git_pull" ] || chmod +x "$git_pull"
"$git_pull"
;;
2)
[ -x "$git_push" ] || chmod +x "$git_push"
"$git_push"
;;
3)
[ -x "$git_log" ] || chmod +x "$git_log"
"$git_log"
;;
4)
[ -x "$git_cache" ] || chmod +x "$git_cache"
"$git_cache"
;;
5)
echo "Goodbye!"
exit 0
;;
*)
echo "Invalid selection. Press any key to continue."
read -n1 -s
;;
esac
echo
echo "Press any key to return to the menu..."
read -n1 -s
done