Skip to content

Commit 6be2c38

Browse files
committed
Add safe help mode to advanced setup script
1 parent 910851e commit 6be2c38

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

scripts/setup.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
# Media Stack Setup Helper (Advanced)
33
# Creates all required folders and prepares config files.
4+
# Usage: bash scripts/setup.sh [--help]
45

56
set -e
67

@@ -10,6 +11,30 @@ NC='\033[0m'
1011

1112
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
1213

14+
usage() {
15+
cat <<EOF
16+
Usage: bash scripts/setup.sh
17+
18+
Creates Media folder structure, generates .env, and copies config templates.
19+
20+
Options:
21+
--help Show this help message
22+
EOF
23+
}
24+
25+
case "${1:-}" in
26+
"" ) ;;
27+
--help|-h)
28+
usage
29+
exit 0
30+
;;
31+
*)
32+
echo "Unknown option: $1"
33+
usage
34+
exit 1
35+
;;
36+
esac
37+
1338
echo ""
1439
echo "=============================="
1540
echo " Media Stack Setup (Advanced)"

0 commit comments

Comments
 (0)