Skip to content

Commit 17d357d

Browse files
committed
add init script validation to workflow
1 parent 0c9615d commit 17d357d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/openwrt-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ jobs:
6868
--exclude='.github' \
6969
./ feed/${PKG_NAME}/
7070
71+
- name: ✅ Validate shell script syntax
72+
run: |
73+
echo "🔍 Checking shell script syntax..."
74+
find feed/${PKG_NAME}/files/etc/init.d/ -type f -name '*' 2>/dev/null | while read -r script; do
75+
if [ -f "$script" ]; then
76+
echo "Checking syntax of: $script"
77+
bash -n "$script" || { echo "❌ Syntax error in $script"; exit 1; }
78+
echo "✅ $script syntax OK"
79+
fi
80+
done
81+
echo "✅ All shell scripts passed syntax validation"
82+
7183
- name: 🧮 Compute ARCH
7284
run: |
7385
if [ "${{ matrix.version }}" = "snapshots" ]; then

0 commit comments

Comments
 (0)