Skip to content

Commit fcec259

Browse files
committed
Started on the scripts
1 parent 9f6f1cf commit fcec259

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

build.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e
3+
4+
for RAML in $(find -name \*.raml); do
5+
IFS='/' read -r -a PATH <<< "$RAML"
6+
7+
FILE="${PATH[-1]}"
8+
9+
unset PATH[${#PATH[@]}-1]
10+
11+
DIRS=""
12+
13+
for index in ${!PATH[*]}
14+
do
15+
if [ "${PATH[$index]}" != "." ]; then
16+
DIRS="$DIRS/${PATH[$index]}"
17+
fi
18+
done
19+
20+
if [ "${DIRS:1}" = "" ]; then
21+
echo "raml2html -o ${FILE/.raml/.html} $FILE" # temporary
22+
else
23+
echo "mkdir -p ${DIRS:1}/ && raml2html -o ${DIRS:1}/${FILE/.raml/.html} $FILE" # temporary
24+
fi
25+
done

deploy.sh

Whitespace-only changes.

process.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if [ "$TRAVIS" != "true" ]; then
5+
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" != "master" ]; then
6+
echo "Building for commit \"${TRAVIS_COMMIT:0:7}\" for repo \"$TRAVIS_REPO_SLUG\""
7+
./build.sh
8+
printf "Pushing to chandocs.github.io..."
9+
exit 0
10+
else
11+
echo "Skipping process; we're either in a PR or on a different branch"
12+
exit 0
13+
fi
14+
else
15+
echo \"Toto, I\'ve a feeling we\'re not in Kansas anymore.\"
16+
fi

0 commit comments

Comments
 (0)