Make build script fail without cwpearson.github.io
This commit is contained in:
10
build.sh
10
build.sh
@@ -1,14 +1,22 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
HUGO_ROOT=`pwd`
|
HUGO_ROOT=`pwd`
|
||||||
|
|
||||||
## Try to find cwpearson.github.io
|
## Try to find cwpearson.github.io
|
||||||
IO_ROOT=`find $HOME -name 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`
|
numpaths=`echo "$IO_ROOT" | wc -l`
|
||||||
|
|
||||||
|
echo $numpaths
|
||||||
|
|
||||||
if [[ "$numpaths" -ne "1" ]]; then
|
if [[ "$numpaths" -ne "1" ]]; then
|
||||||
echo "Found more than one cwpearson.github.io"
|
echo "Found more than one cwpearson.github.io"
|
||||||
exit -1
|
exit -1
|
||||||
|
|||||||
Reference in New Issue
Block a user