From 6e985b8595f56bb6e64a2a5dbf16e69a611d772d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 9 Aug 2017 19:54:04 +0300 Subject: add build.sh --- _config.yml | 1 + build.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 build.sh diff --git a/_config.yml b/_config.yml index 1236f70..e78bd06 100644 --- a/_config.yml +++ b/_config.yml @@ -3,6 +3,7 @@ plugins: - jekyll-github-metadata exclude: + - build.sh - Gemfile - Gemfile.lock - LICENSE.txt diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..249700b --- /dev/null +++ b/build.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail + +script_name="$( basename -- "${BASH_SOURCE[0]}" )" + +case "$#" in + 0) ;; + 1) + dest_dir="$1" + ;; + *) + echo "usage: $script_name [DEST_DIR]" >&2 + exit 1 +esac + +bundle exec jekyll build \ + --config _config.yml,_config_dev.yml \ + ${dest_dir+--destination "$dest_dir"} \ + --drafts -- cgit v1.2.3