From 882d9d10def8c49b3eeb548d17462933fa2c5048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 10 Jan 2019 20:23:00 -0500 Subject: first commit --- scripts/style.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 scripts/style.sh (limited to 'scripts/style.sh') diff --git a/scripts/style.sh b/scripts/style.sh new file mode 100644 index 0000000..8c7aaf3 --- /dev/null +++ b/scripts/style.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# ============================================================================== +# FUNCTIONS - START +# ============================================================================== + +run_it() +{ + + local _name="${1-style}" + local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" + local _src="${_dir%scripts}/src/sass/custom/${_name}.sass" # input + local _dest="${_dir%scripts}/dist/css/${_name}.css" # output + local _options="${3---sourcemap=none}" + + # ---------------------------------------------------------------------------- + local _dest_dir + _dest_dir="$(dirname "${_dest}")" + + if [ ! -d "${_dest_dir}" ]; then + + mkdir -p "${_dest_dir}" + + fi + + # ---------------------------------------------------------------------------- + + sass "${_src}":"${_dest}" "${_options}" + +} +# run_it() + +# ============================================================================== +# FUNCTIONS - END +# ============================================================================== + + + +# ============================================================================== +# EXECUTION - START +# ============================================================================== + +run_it "$@" + +# ============================================================================== +# EXECUTION - END +# ============================================================================== -- cgit v1.2.3