aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/js.sh
blob: ea5bbf0eef990a5f70340eaed8709cf900c0851a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#

run_aplaylist()
{
    local _name="${1-aplaylist}"
    local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
    local _target="${_dir%/*}" # deleted slash
    local _src="${_target%scripts}/src/js/${_name}.js" # input
    local _dest="${_target%scripts}/dist/js/" # output

    if [[ -n "${_src}" ]];
    then
        mkdir -p "${_dest}"
        cp -fv "${_src}" "${_dest}"
    fi

}

# ==============================================================================
# EXECUTION - START
# ==============================================================================
run_aplaylist "$@"