-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild
executable file
·53 lines (38 loc) · 974 Bytes
/
build
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -e
set -x
HARNESSES=(akeneo drupal8 magento1 magento2 spryker symfony wordpress)
function main()
{
build_base
for harness in "${HARNESSES[@]}"
do
build "$harness"
done
}
function build()
{
local harness="$1"
if [[ ! -d "$harness" ]]; then
echo "harness '${harness}' not found."
fi
local harness_dist_path="./dist/harness-${harness}/"
local harness_src_path="./src/${harness}/"
if [[ -d "$harness_dist_path" ]]; then
rm -rf "$harness_dist_path"
fi
mkdir "$harness_dist_path"
rsync -va "./src/_base/" "$harness_dist_path"
rsync -va "$harness_src_path" "$harness_dist_path"
}
function build_base()
{
local harness_dist_path="./dist/harness-php/"
local harness_src_path="./src/_base/"
if [[ -d "$harness_dist_path" ]]; then
rm -rf "$harness_dist_path"
fi
mkdir "$harness_dist_path"
rsync -va "./src/_base/" "$harness_dist_path"
}
main