-
Notifications
You must be signed in to change notification settings - Fork 1
/
centos7-build.sh
executable file
·23 lines (17 loc) · 1.2 KB
/
centos7-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
#!/bin/bash
interpolate() {
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg; s/\$\{([^}]+)\}//eg' $1 > $2
}
python setup.py install --no-compile --record=/dev/null --prefix=${BUILDPATH}/usr --install-lib=${BUILDPATH}/usr/lib/python2.7/site-packages --install-scripts=${BUILDPATH}${BINPATH}
interpolate svc/platoon.yaml platoon.yaml.install
install -D -m 0644 platoon.yaml.install $BUILDPATH$SVCPATH/platoon/platoon.yaml
interpolate svc/appstack-platoon.service appstack-platoon.service
install -D -m 0644 appstack-platoon.service $BUILDPATH/etc/systemd/system/appstack-platoon.service
interpolate svc/centos7-platoon-ctl.sh platoon-ctl.sh.install
install -D -m 0755 platoon-ctl.sh.install $BUILDPATH$SVCPATH/platoon/platoon-ctl
interpolate svc/platoonapi.yaml platoonapi.yaml.install
install -D -m 0644 platoonapi.yaml.install $BUILDPATH$SVCPATH/platoon/platoonapi.yaml
interpolate svc/logrotate-platoonapi.conf logrotate-platoonapi.conf.install
install -D -m 0644 logrotate-platoonapi.conf.install $BUILDPATH/etc/logrotate.d/siq-platoonapi
interpolate svc/logrotate-platoon.conf logrotate-platoon.conf.install
install -D -m 0644 logrotate-platoon.conf.install $BUILDPATH/etc/logrotate.d/siq-platoon