2024-08-14 12:18:58 +00:00
|
|
|
#!/bin/bash
|
2024-08-14 10:43:07 +00:00
|
|
|
|
2024-08-14 12:18:58 +00:00
|
|
|
# Default values
|
|
|
|
PORT=8080
|
2024-08-14 10:43:07 +00:00
|
|
|
|
2024-08-14 12:18:58 +00:00
|
|
|
# Parse command-line arguments
|
|
|
|
while [[ "$#" -gt 0 ]]; do
|
|
|
|
case $1 in
|
|
|
|
-p|--port) PORT="$2"; shift ;;
|
|
|
|
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
# Run the Go application with the parsed flags
|
2024-08-16 12:46:31 +00:00
|
|
|
go run discord.go rss.go telegram.go save.go main.go -p=$PORT
|