aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/icons.bash
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/icons.bash')
-rw-r--r--scripts/icons.bash39
1 files changed, 39 insertions, 0 deletions
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 "$@"