forked from booktype/Booktype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen-snapshot.sh
executable file
·55 lines (37 loc) · 1.34 KB
/
gen-snapshot.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
#/bin/sh
# Script for generating nightly Booktype snapshot packages
# Run from the directory containg the files checked out from git
VERSION=1.5.4~$(date "+%Y%m%d")
BUILDDEST=/tmp/booktype-${VERSION}/
DEBDIR=`pwd`/debian
git checkout devel
git pull
echo "cleaning up previous build..."
rm -rf /tmp/booktype-*
mkdir -p ${BUILDDEST}booktype
echo "copying files to temporary directory..."
cp -a * ${BUILDDEST}booktype || exit
cp -a $DEBDIR ${BUILDDEST}debian || exit
cd ${BUILDDEST} || exit
# Set the version of the snapshot package
sed -i "1s:(1.5.4-1):(${VERSION}):g" debian/changelog
# Fixes for 1.5.4 #############
# remove directories not needed by users
rm -r tests
rm -r tools
# moved to debian/copyright
rm AUTHORS.txt
rm LICENSE.txt
rm lib/booki/site_static/js/tiny_mce/classes/firebug/FIREBUG.LICENSE
rm lib/booki/site_static/js/tiny_mce/license.txt
rm lib/booki/site_static/js/jquery/AUTHORS.txt
rm lib/booki/site_static/js/jquery/MIT-LICENSE.txt
rm lib/booki/site_static/js/jquery/GPL-LICENSE.txt
#Fix permissions
#############################
echo "running the build..."
debuild -b -uc -us $@ || exit
# copy the new package to the public server
# scp /tmp/booktype_${VERSION}_all.deb apt.sourcefabric.org:/var/www/apt/snapshots/
# copy the build log too
# scp /tmp/booktype_${VERSION}_amd64.build apt.sourcefabric.org:/var/www/apt/snapshots/