diff options
author | Jesús <heckyel@hyperbola.info> | 2021-12-01 22:45:05 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-01 22:45:05 -0500 |
commit | 0ef5a8fe632e568c1b80572ae23e46c61f2da185 (patch) | |
tree | 352d7273796b975227eca82f34857be71abf9052 /scripts/noscript.bash | |
download | countries-0ef5a8fe632e568c1b80572ae23e46c61f2da185.tar.lz countries-0ef5a8fe632e568c1b80572ae23e46c61f2da185.tar.xz countries-0ef5a8fe632e568c1b80572ae23e46c61f2da185.zip |
initial public
Diffstat (limited to 'scripts/noscript.bash')
-rw-r--r-- | scripts/noscript.bash | 37 |
1 files changed, 37 insertions, 0 deletions
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 "$@" |