summaryrefslogtreecommitdiff
path: root/.tools/jobs/spaces.sh
blob: 4e17a3eca0d553b4a2177597600a140135d7db51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

find -H . -type f -name "*.txt" -exec sed -i 's/[[:blank:]]*$//' {} \;

export RES=$(git diff --name-only)
if [[ -n "${RES}" ]]; then
    echo "Extra spaces before new lines detected in files:"
    git diff --name-only
    # I don't want this to be critical on TMW2
    #exit 1
fi