blob: 0d16175ceb21a01881fa5bb27d8b5779f385c732 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 "$@"
|