#!/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 < "$LOG_FILE" echo "Log file cleared successfully: $LOG_FILE" else echo "Log file not found: $LOG_FILE" fi ;; 8) # Clear Laravel log first LOG_DATE=$(date +%Y-%m-%d) LOG_FILE="${SCRIPT_DIR}/storage/logs/laravel-${LOG_DATE}.log" if [ -f "$LOG_FILE" ]; then > "$LOG_FILE" echo "Log file cleared successfully: $LOG_FILE" else echo "Log file not found: $LOG_FILE" fi # Pause and wait for user input echo echo "Press Enter to continue and show the logs..." read -r # Then show logs echo "Showing Laravel logs..." [ -x "$git_log" ] || chmod +x "$git_log" "$git_log" ;; 9) 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