run.sh 661 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # This script launches Retro AIM Server under MacOS/Linux. Because it assumes
  3. # that the executable and settings.env file are located in the same directory
  4. # as this script, the script can be run from any directory.
  5. set -e
  6. SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
  7. ENV_FILE="$SCRIPT_DIR/settings.env"
  8. EXEC_FILE="$SCRIPT_DIR/retro_aim_server"
  9. # Load the settings file.
  10. if [ -f "$ENV_FILE" ]; then
  11. . "$ENV_FILE"
  12. else
  13. echo "error: environment file '$ENV_FILE' not found."
  14. exit 1
  15. fi
  16. # Start Retro AIM Server.
  17. if [ -f "$EXEC_FILE" ]; then
  18. "$EXEC_FILE"
  19. else
  20. echo "error: executable '$EXEC_FILE' not found."
  21. exit 1
  22. fi