From 0ef5a8fe632e568c1b80572ae23e46c61f2da185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 1 Dec 2021 22:45:05 -0500 Subject: initial public --- scripts/noscript.bash | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/noscript.bash (limited to 'scripts/noscript.bash') diff --git a/scripts/noscript.bash b/scripts/noscript.bash new file mode 100644 index 0000000..ee8efd4 --- /dev/null +++ b/scripts/noscript.bash @@ -0,0 +1,37 @@ +#!/bin/bash + +_dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" +_target="${_dir%/*}" # deleted slash +_dest="${_target%scripts}/dist/css/" + +# ============================================================================== +# FUNCTIONS - START +# ============================================================================== +run_prepare() { + install -d -m755 "${_dest}" +} + +run_it() +{ + local _name="${1-noscript}" + local _src="${_target%scripts}/src/scss/styles/${_name}.scss" # input + local _fdest="${_target%scripts}/dist/css/${_name}.css" # output + # ---------------------------------------------------------------------------- + sassc -t expanded "${_src}" "${_fdest}" +} + +run_compress() +{ + local _name="${1-noscript}" + local _src="${_target%scripts}/src/scss/styles/${_name}.scss" # input + local _fdest="${_target%scripts}/dist/css/${_name}.min.css" # output + # ---------------------------------------------------------------------------- + sassc -t compressed "${_src}" "${_fdest}" +} + +# ============================================================================== +# EXECUTION - START +# ============================================================================== +run_prepare "$@" +run_it "$@" +run_compress "$@" -- cgit v1.2.3