forked from hubmapconsortium/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·33 lines (26 loc) · 791 Bytes
/
run.sh
File metadata and controls
executable file
·33 lines (26 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
if [ -z "$1" ]
then
echo " Must provide the absolute path to the local directory where hubmapconsortium/documentation was cloned."; echo " Like ./run.sh /users/myuser/projects/hubmap/documentation"; exit 1;
fi
if [ ! -d "$1" ]
then
echo "$1 must be a valid directory"; exit 1;
fi
if [[ "$1" != /* ]]
then
echo "$1 is not an absolute path."; exit 1;
fi
if [[ "$1" == */ ]]
then
S_DOC_DIR=`echo "$1" | rev | cut -c2- | rev`;
else
S_DOC_DIR="$1";
fi
if [ ! -d "$S_DOC_DIR/docs" ]
then
echo "docs directory expected, but not found at $S_DOC_DIR/docs"; exit 1;
fi
# Pull in latest changes from the submodule
git submodule update --init --remote
docker run -it -p4000:4000 -v $S_DOC_DIR:/software-docs hubmap/github-pages-server:1.0.1