16 lines
334 B
Bash
Executable file
16 lines
334 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Default values
|
|
PORT=8080
|
|
|
|
# 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
|
|
go run rss.go telegram.go save.go main.go -p=$PORT
|