forked from Koha-Community/Koha
-
Notifications
You must be signed in to change notification settings - Fork 2
/
publishKoha.sh
executable file
·36 lines (27 loc) · 1.36 KB
/
publishKoha.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
#!/bin/bash
if [ $# -lt 1 ]; then
echo "You have to specify version" 1>&2
exit 1
fi
VERSION=$1
SERVER=192.168.1.113
USER=root
msgcat misc/translator/po/cs-CZ-opac-bootstrap-orig.po misc/translator/po/cs-CZ-opac-bootstrap-kohacz.po > misc/translator/po/cs-CZ-opac-bootstrap.po
msgcat misc/translator/po/cs-CZ-staff-prog-orig.po misc/translator/po/cs-CZ-staff-prog-kohacz.po > misc/translator/po/cs-CZ-staff-prog.po
msgcat misc/translator/po/cs-CZ-pref-orig.po misc/translator/po/cs-CZ-pref-kohacz.po > misc/translator/po/cs-CZ-pref.po
DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v $VERSION -d --noautoversion
echo "Build finished, press any key to upload deb files to repository server..."
read -n 1 -s
scp "../debian/koha-deps_${VERSION}_all.deb" $USER@$SERVER:/root/kohadeb/
scp "../debian/koha-perldeps_${VERSION}_all.deb" $USER@$SERVER:/root/kohadeb/
scp "../debian/koha-common_${VERSION}_all.deb" $USER@$SERVER:/root/kohadeb/
ssh $USER@$SERVER <<ENDSSH
cd /root/
aptly repo add kohacz kohadeb/koha-deps_${VERSION}_all.deb
aptly repo add kohacz kohadeb/koha-perldeps_${VERSION}_all.deb
aptly repo add kohacz kohadeb/koha-common_${VERSION}_all.deb
aptly snapshot create $VERSION from repo kohacz
ENDSSH
rm misc/translator/po/cs-CZ-opac-bootstrap.po
rm misc/translator/po/cs-CZ-staff-prog.po
rm misc/translator/po/cs-CZ-pref.po