move bash commands into external script

This commit is contained in:
Andy Bauer 2017-02-19 10:18:59 -06:00
parent c305f9dbfd
commit 4f8b11d56f
2 changed files with 15 additions and 9 deletions

View File

@ -38,15 +38,7 @@ addons:
- curl
script:
- utils/packpack/startpackpack.sh
# TO-DO move the following to an external script file
- if [ ${OS} == "ubuntu" ] && [ ${DIST} == "trusty" ]; then
set -ev;
sudo gdebi --non-interactive build/zoneminder_*amd64.deb;
sudo chmod 644 /etc/zm/zm.conf;
mysql -uzmuser -pzmpass zm < db/test.monitor.sql;
sudo /usr/bin/zmpkg.pl start;
sudo /usr/bin/zmfilter.pl -f purgewhenfull;
fi
- utils/packpack/installzm.sh
deploy:
# Deploy packages to PackageCloud
provider: packagecloud

14
utils/packpack/installzm.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Required, so that Travis marks the build as failed if any of the steps below fail
set -ev
# Install and test the zoneminder package (only) for Ubuntu Trusty
if [ ${OS} == "ubuntu" ] && [ ${DIST} == "trusty" ]; then
sudo gdebi --non-interactive build/zoneminder_*amd64.deb
sudo chmod 644 /etc/zm/zm.conf
mysql -uzmuser -pzmpass zm < db/test.monitor.sql
sudo /usr/bin/zmpkg.pl start
sudo /usr/bin/zmfilter.pl -f purgewhenfull
fi