run_dev.sh 645 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. # This script launches Retro AIM Server using go run with the environment vars
  3. # defined in config/settings.env under MacOS/Linux. The script can be run from
  4. # any working directory--it assumes the location of config/command files
  5. # relative to the path of this script.
  6. set -e
  7. SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
  8. ENV_FILE="$SCRIPT_DIR/../config/settings.env"
  9. REPO_ROOT="$SCRIPT_DIR/.."
  10. # Load the settings file.
  11. if [ -f "$ENV_FILE" ]; then
  12. . "$ENV_FILE"
  13. else
  14. echo "error: environment file '$ENV_FILE' not found."
  15. exit 1
  16. fi
  17. # Run Retro AIM Server from repo root.
  18. cd "$REPO_ROOT"
  19. go run -v ./cmd/server