remove build and update scripts

This commit is contained in:
Carl Pearson
2017-12-17 17:31:24 -06:00
parent 9478882bd5
commit d36fbb2034
2 changed files with 0 additions and 57 deletions

View File

@@ -1,48 +0,0 @@
#! /bin/bash
set -eoux pipefail
HUGO_ROOT=`pwd`
## Try to find cwpearson.github.io
IO_ROOT=`find $HOME -type d ! -perm -a+r -prune -o -name cwpearson.github.io -print`
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
fi
# Try building the website locally
cd "$HUGO_ROOT"
echo "Building site"
hugo
# Clean up local build
rm -r "$HUGO_ROOT/public"
# Clean up github.io repo
echo "Updating and cleaning cwpearson.github.io"
cd "$IO_ROOT"
git pull
rm -rf *
# Build website
cd "$HUGO_ROOT"
echo "Building site"
hugo -d "$IO_ROOT"
# push new content
cd $IO_ROOT
git add *
git commit -am "[build.sh] Deployed from hugo-cwpearson"
git push

View File

@@ -1,9 +0,0 @@
#! /bin/bash
set -eoux pipefail
HUGO_ROOT=`pwd`
cd "$HUGO_ROOT"
echo "Updating theme"
git submodule update --recursive --remote