aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 19:58:59 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 19:59:55 +0300
commit7fc28a7ff20596ba9b7ae8283401164be914fcb5 (patch)
tree6b0ee67c06244a374479fc6baf6177c83b7a8d7b
parentserve.sh: add destination directory parameter (diff)
downloadegor-tensin.github.io-7fc28a7ff20596ba9b7ae8283401164be914fcb5.tar.gz
egor-tensin.github.io-7fc28a7ff20596ba9b7ae8283401164be914fcb5.zip
add build.sh
Diffstat (limited to '')
-rw-r--r--_config.yml1
-rw-r--r--build.sh19
2 files changed, 20 insertions, 0 deletions
diff --git a/_config.yml b/_config.yml
index ca2c84c..461fc52 100644
--- a/_config.yml
+++ b/_config.yml
@@ -2,6 +2,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..8ccbc4f
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,19 @@
+#!/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"}