aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fonts.bash28
-rw-r--r--scripts/home.bash37
-rw-r--r--scripts/icons.bash39
-rw-r--r--scripts/js.bash27
-rw-r--r--scripts/normalize.bash37
-rw-r--r--scripts/post.bash37
6 files changed, 205 insertions, 0 deletions
diff --git a/scripts/fonts.bash b/scripts/fonts.bash
new file mode 100644
index 0000000..9ae3ed6
--- /dev/null
+++ b/scripts/fonts.bash
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+_dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+_target="${_dir%/*}" # deleted slash
+_dest="${_target%scripts}/dist/fonts/roboto/"
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+run_prepare() {
+ install -d -m755 "${_dest}"
+}
+
+run_roboto()
+{
+ local _name="${1-roboto-latin}"
+ local _src="${_target%scripts}/src/fonts/roboto/${_name}.woff2" # input
+ # copy font Roboto
+ if [[ -n "${_src}" ]]; then
+ cp -fv "${_src}" "${_dest}"
+ fi
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_prepare "$@"
+run_roboto "$@"
diff --git a/scripts/home.bash b/scripts/home.bash
new file mode 100644
index 0000000..ac21bb6
--- /dev/null
+++ b/scripts/home.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-home}"
+ 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-home}"
+ 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 "$@"
diff --git a/scripts/icons.bash b/scripts/icons.bash
new file mode 100644
index 0000000..e1fb5c4
--- /dev/null
+++ b/scripts/icons.bash
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+_dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+_target="${_dir%/*}" # deleted slash
+_dest="${_target%scripts}/dist/images/icons/"
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+run_prepare() {
+ install -d -m755 "${_dest}"
+}
+
+run_sun()
+{
+ local _name="${1-sun}"
+ local _src="${_target%scripts}/src/images/icons/${_name}.svg" # input
+ # copy sun.svg
+ if [[ -n "${_src}" ]]; then
+ cp -fv "${_src}" "${_dest}"
+ fi
+}
+
+run_moon()
+{
+ local _name="${1-moon}"
+ local _src="${_target%scripts}/src/images/icons/${_name}.svg" # input
+ # copy moon.svg
+ if [[ -n "${_src}" ]]; then
+ cp -fv "${_src}" "${_dest}"
+ fi
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_prepare "$@"
+run_sun "$@"
+run_moon "$@"
diff --git a/scripts/js.bash b/scripts/js.bash
new file mode 100644
index 0000000..0d16175
--- /dev/null
+++ b/scripts/js.bash
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+_dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+_target="${_dir%/*}" # deleted slash
+_dest="${_target%scripts}/dist/js/"
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+run_prepare() {
+ install -d -m755 "${_dest}"
+}
+
+run_switch_storage()
+{
+ local _name="${1-switch-storage}"
+ local _src="${_target%scripts}/src/js/${_name}.js" # input
+ if [[ -n "${_src}" ]]; then
+ cp -fv "${_src}" "${_dest}"
+ fi
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_prepare "$@"
+run_switch_storage "$@"
diff --git a/scripts/normalize.bash b/scripts/normalize.bash
new file mode 100644
index 0000000..863ab1d
--- /dev/null
+++ b/scripts/normalize.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-normalize}"
+ 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-normalize}"
+ 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 "$@"
diff --git a/scripts/post.bash b/scripts/post.bash
new file mode 100644
index 0000000..3cb46e9
--- /dev/null
+++ b/scripts/post.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-post}"
+ 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-post}"
+ 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 "$@"