Skip to content

minor fixes

minor fixes #209

Workflow file for this run

name: Bash Syntax Check
on:
pull_request:
paths:
- "misc/**/*.func"
- "ct/**/*.sh"
- "install/**/*.sh"
- ".github/workflows/bash-syntax.yml"
push:
branches: [main]
paths:
- "misc/**/*.func"
- "ct/**/*.sh"
- "install/**/*.sh"
- ".github/workflows/bash-syntax.yml"
jobs:
bash-n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Syntax-check misc functions
run: |
set -euo pipefail
fail=0
while IFS= read -r -d '' f; do
if ! bash -n "$f"; then
echo "::error file=$f::bash -n failed"
fail=1
fi
done < <(find misc -type f -name '*.func' -print0 | sort -z)
exit "$fail"
- name: Syntax-check sample CT scripts
run: |
set -euo pipefail
samples=(ct/debian.sh ct/alpine.sh ct/ubuntu.sh)
fail=0
for f in "${samples[@]}"; do
[[ -f "$f" ]] || continue
if ! bash -n "$f"; then
echo "::error file=$f::bash -n failed"
fail=1
fi
done
exit "$fail"