-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sh
executable file
·65 lines (55 loc) · 2.12 KB
/
build.sh
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
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
if [ -z "$1" ]; then
echo "Please specify version to build"
exit 1
fi
VERSION=$1
if [ $VERSION -eq 2 ]; then
rm sameday.$VERSION.ocmod.zip
rm -rf upload
mkdir upload
cp -r --parents \
admin/controller/extension/shipping/sameday.php \
admin/language/en-gb/extension/shipping/sameday.php \
admin/model/extension/shipping/sameday.php \
admin/view/template/extension/shipping/sameday.tpl \
admin/view/template/extension/shipping/sameday_add_awb.tpl \
admin/view/template/extension/shipping/sameday_awb_history_status.tpl \
admin/view/template/extension/shipping/sameday_awb_history_status_refresh.tpl \
admin/view/template/extension/shipping/sameday_service.tpl \
catalog/model/extension/shipping/sameday.php \
system/library/sameday-php-sdk/ \
system/library/sameday-classes/ \
system/library/samedayclasses.php \
upload
cp install.$VERSION.xml install.xml
zip -r sameday.$VERSION.ocmod.zip upload install.xml
rm install.xml
rm -rf upload
exit
elif [ $VERSION -eq 3 ]; then
rm sameday.$VERSION.ocmod.zip
rm -rf upload
mkdir upload
cp -r --parents \
admin/controller/extension/shipping/sameday.php \
admin/language/en-gb/extension/shipping/sameday.php \
admin/model/extension/shipping/sameday.php \
admin/view/template/extension/shipping/sameday.twig \
admin/view/template/extension/shipping/sameday_add_awb.twig \
admin/view/template/extension/shipping/sameday_awb_history_status.twig \
admin/view/template/extension/shipping/sameday_awb_history_status_refresh.twig \
admin/view/template/extension/shipping/sameday_service.twig \
catalog/model/extension/shipping/sameday.php \
system/library/sameday-php-sdk/ \
system/library/sameday-classes/ \
system/library/samedayclasses.php \
upload
cp install.$VERSION.xml install.xml
zip -r sameday.$VERSION.ocmod.zip upload install.xml
rm install.xml
rm -rf upload
exit
fi
echo "Unknown version $VERSION specified"
exit 1