summaryrefslogtreecommitdiff
path: root/scripts/vendor.sh
blob: bb7b80f10ea9153d042a5324ec879969b826c54b (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
28
29
30
31
#!/bin/bash

run_vendor()
{

    local LOCALDIR="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
    local TARGET="${LOCALDIR%/*}" # deleted slash
    local BASE="${TARGET%scripts}" # input

    if [[ -d "$BASE"/local.env/hashover-next/ ]];
    then
        rm -rf "$BASE"/output/hashover-next/
        echo "$BASE"/output/ | xargs -n 1 cp -rf "$BASE"/local.env/hashover-next/
    else
        echo 'Not hashover'
    fi

    if [[ -f "$BASE"/local.env/.htaccess ]];
    then
        rm -rf "$BASE"/output/.htaccess
        cp -rf "$BASE"/local.env/.htaccess "$BASE"/output/
    else
        echo 'Not exits .htaccess'
    fi

}

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