Skip to content

Commit d653717

Browse files
committed
Travis checking +x for .sh files
1 parent a211583 commit d653717

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
script:
2+
# Check for +x on .sh files
3+
- bash ./travis/checkx.sh

setup.sh

100644100755
File mode changed.

travis/checkx.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# @author Addshore
3+
# Check all .sh files for the +x bit
4+
5+
failed=false
6+
7+
for file in $( find . -type f -name '*.sh' ); do
8+
if [[ -x "$file" ]]
9+
then
10+
echo "File '$file' is executable"
11+
else
12+
echo "File '$file' is not executable"
13+
failed=true
14+
fi
15+
done
16+
17+
if [[ $failed == true ]]
18+
then
19+
echo "Failed: not all .sh files have +x"
20+
exit 1
21+
fi

0 commit comments

Comments
 (0)