File: trailing-space.sh

package info (click to toggle)
distrobuilder 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,436 kB
  • sloc: sh: 214; makefile: 76
file content (9 lines) | stat: -rwxr-xr-x 225 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
#!/bin/sh -eu

echo "Checking that there are no trailing spaces in shell scripts..."

OUT=$(git grep --untracked -lP "\s$" '*.sh' || true)
if [ -n "${OUT}" ]; then
  echo "ERROR: trailing space in script: ${OUT}"
  exit 1
fi