script/default-site: read Jekyll source from local clone

If you bump the version in the repo, then it all goes haywire.
This commit is contained in:
Parker Moore 2016-08-02 15:55:33 -07:00
parent 6d2b344c0e
commit 3943de066c
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 4 additions and 0 deletions

View File

@ -7,10 +7,14 @@ echo "$0: setting up tmp directory"
mkdir -p ./tmp mkdir -p ./tmp
rm -Rf ./tmp/default-site rm -Rf ./tmp/default-site
workdir=$(pwd)
echo "$0: creating new default site" echo "$0: creating new default site"
bundle exec exe/jekyll new tmp/default-site bundle exec exe/jekyll new tmp/default-site
pushd tmp/default-site pushd tmp/default-site
echo "$0: respecifying the jekyll install location"
ruby -e "contents = File.read('Gemfile'); File.write('Gemfile', contents.sub(/gem \"jekyll\".*\\n/, 'gem \"jekyll\", path: \"$workdir\"'))"
echo "$0: installing default site dependencies" echo "$0: installing default site dependencies"
BUNDLE_GEMFILE=Gemfile bundle install BUNDLE_GEMFILE=Gemfile bundle install
echo "$0: building the default site" echo "$0: building the default site"