Migrate pre-commit.entrypoint.sh to POSIX sh (#5540)
All checks were successful
continuous-integration/drone/push Build is passing

The script was basically posix with a bashism.
POSIX sh is lighter and thus better.

Reviewed-on: #5540
Reviewed-by: delliott <delliott@fsfe.org>
This commit was merged in pull request #5540.
This commit is contained in:
2025-12-11 09:06:57 +00:00
parent 1edd6a1d97
commit 09b117d306
2 changed files with 4 additions and 4 deletions

View File

@@ -45,4 +45,4 @@ COPY pre-commit.entrypoint.sh ./
# Set the workdir
WORKDIR /website-source
ENTRYPOINT ["bash", "/website-source-during-build/pre-commit.entrypoint.sh"]
ENTRYPOINT ["sh", "/website-source-during-build/pre-commit.entrypoint.sh"]

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
#!/bin/sh
set -eu
# Get the changed files
target_branch="${1:-master}"
@@ -8,7 +8,7 @@ files="$(git diff --name-only "$source_branch" "$target_branch")"
files_args=""
for file in $files; do
if [ -f "$file" ]; then
files_args+="--file $file "
files_args="$files_args --file $file"
fi
done