#!/bin/bash

# Use the current directory
script_directory="."

# Get the name of this script with the "./" prefix
current_script="./$(basename "$0")"

# Loop through each .sh file in the current directory
for script in "$script_directory"/*.sh; do
  # Check if the file exists and is executable
  if [ -f "$script" ] && [ -x "$script" ]; then
    # Check if the script is not the current script
    if [ "$script" != "$current_script" ]; then
      echo "Executing $script..."
      "$script"  # Execute the script
    fi
  else
    echo "Skipping $script (not a file or not executable)."
  fi
done