Skip to content

Commit 3860062

Browse files
committed
travisify.sh: ensure correct build.sh permissions on Windows
1 parent 6b25a09 commit 3860062

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

travisify.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ var() {
4141
update() {
4242
file=$1
4343
msg=$2
44+
exe=$3
4445
test "$msg" || msg="Travis: update $file"
4546
if [ -e "$file" ]
4647
then
@@ -59,6 +60,11 @@ update() {
5960
fi
6061
rm -rf "$tmpFile"
6162
$EXEC git add "$file"
63+
if [ -n "$exe" ]
64+
then
65+
info "Adding execute permission to $file"
66+
$EXEC git update-index --chmod=+x "$file"
67+
fi
6268
$EXEC git diff-index --quiet HEAD -- || $EXEC git commit -m "$msg"
6369
}
6470

@@ -135,7 +141,7 @@ curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/trav
135141
sh travis-build.sh
136142
EOL
137143
chmod +x "$tmpFile"
138-
update "$travisBuildScript"
144+
update "$travisBuildScript" "Travis: add executable script $travisBuildScript" "true"
139145

140146
# Remove obsolete Travis-related files.
141147
if [ -f "$travisSettingsFile" ]

0 commit comments

Comments
 (0)