Skip to content

Commit d7dccea

Browse files
committed
ENH: add some extra checks in gh-pages script
Check that directory to upload exists, contains an index.html, and does not contain a current .git directory.
1 parent 654735c commit d7dccea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/upload-gh-pages.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ if [ -z "$HTML_DIR" ]; then
66
echo $USAGE
77
exit 1
88
fi
9+
if [ ! -e "$HTML_DIR/index.html" ]; then
10+
echo "$HTML_DIR does not contain an index.html"
11+
exit 1
12+
fi
13+
if [ -d "$HTML_DIR/.git" ]; then
14+
echo "$HTML_DIR already contains a .git directory"
15+
exit 1
16+
fi
917
PROJECT=$2
1018
if [ -z "$PROJECT" ]; then
1119
echo $USAGE

0 commit comments

Comments
 (0)