Make build script fail without cwpearson.github.io

This commit is contained in:
Carl Pearson
2017-09-27 08:15:51 -05:00
parent 684d9cae84
commit 1c23ca79f2

View File

@@ -1,14 +1,22 @@
#! /bin/bash
set -eou pipefail
HUGO_ROOT=`pwd`
## Try to find cwpearson.github.io
IO_ROOT=`find $HOME -name cwpearson.github.io`
echo "Found" "$IO_ROOT"
if [[ -z "$IO_ROOT" ]]; then
echo "Couldn't find cwpearson.github.io in $HOME"
exit -1
fi
echo "Found" "$IO_ROOT"
numpaths=`echo "$IO_ROOT" | wc -l`
echo $numpaths
if [[ "$numpaths" -ne "1" ]]; then
echo "Found more than one cwpearson.github.io"
exit -1