2017-03-29 18:01:35 +02:00
|
|
|
#!/usr/bin/env bash
|
2017-03-29 19:51:37 +02:00
|
|
|
VERSION=`git rev-list HEAD --count`
|
|
|
|
|
2017-03-29 18:01:35 +02:00
|
|
|
rm -f *.deb
|
|
|
|
rm -Rf builddir
|
|
|
|
mkdir builddir
|
|
|
|
mkdir builddir/DEBIAN
|
|
|
|
cp ./control ./builddir/DEBIAN
|
2017-03-29 20:00:10 +02:00
|
|
|
cp ./postinst ./builddir/DEBIAN
|
2017-03-29 18:01:35 +02:00
|
|
|
|
|
|
|
sed "s/VERSION/$VERSION/" -i ./builddir/DEBIAN/control
|
|
|
|
|
|
|
|
mkdir -p builddir/opt/tisbackup/
|
|
|
|
mkdir -p ./builddir/usr/lib/systemd/system/
|
2017-03-29 19:51:37 +02:00
|
|
|
mkdir -p ./builddir/etc/tis
|
|
|
|
mkdir -p ./builddir/etc/cron.d/
|
2017-03-29 18:01:35 +02:00
|
|
|
|
2020-12-08 11:48:26 +01:00
|
|
|
rsync -aP --exclude "deb/" --exclude "doc/" --exclude "rpm/" --exclude ".git" ../ ./builddir/opt/tisbackup
|
2017-03-29 19:51:37 +02:00
|
|
|
rsync -aP ../scripts/tisbackup_gui.service ./builddir/usr/lib/systemd/system/
|
|
|
|
rsync -aP ../scripts/tisbackup_huey.service ./builddir/usr/lib/systemd/system/
|
|
|
|
rsync -aP ../samples/tisbackup.cron ./builddir/etc/cron.d/tisbackup
|
|
|
|
rsync -aP ../samples/tisbackup_gui.ini ./builddir/etc/tis
|
|
|
|
rsync -aP ../samples/tisbackup-config.ini.sample ./builddir/etc/tis/tisbackup-config.ini.sample
|
2017-03-30 11:58:23 +02:00
|
|
|
rsync -aP ../lib/huey/bin/huey_consumer.py ./builddir/opt/tisbackup/
|
2017-03-29 18:01:35 +02:00
|
|
|
|
2017-03-29 19:51:37 +02:00
|
|
|
chmod 755 /opt/tisbackup/tisbackup.py
|
2017-03-29 18:01:35 +02:00
|
|
|
|
|
|
|
dpkg-deb --build builddir tis-tisbackup-${VERSION}.deb
|
|
|
|
|
|
|
|
|