aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 19:54:04 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 19:54:04 +0300
commit6e985b8595f56bb6e64a2a5dbf16e69a611d772d (patch)
tree3d0927a6a769c969313118ddaaa09332294beafb /build.sh
parentserve.sh: add destination directory parameter (diff)
downloadsorting-algorithms-6e985b8595f56bb6e64a2a5dbf16e69a611d772d.tar.gz
sorting-algorithms-6e985b8595f56bb6e64a2a5dbf16e69a611d772d.zip
add build.sh
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh20
1 files changed, 20 insertions, 0 deletions
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