forked from pchev/skychart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildsrc.sh
executable file
·52 lines (37 loc) · 1.01 KB
/
buildsrc.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
#!/bin/bash
# Script to make the full source tar for release
version=4.3
repo=https://github.com/pchev/skychart.git
builddir=/tmp/skychart-src # Be sure this is set to a non existent directory, it is removed after the run!
wd=`pwd`
# Get revision number
rev=$(git rev-list --count --first-parent HEAD)
verdir=skychart-$version-$rev-src
mkdir -p $builddir
cd $builddir
if [[ $? -ne 0 ]]; then exit 1;fi
# export sources
svn export $repo/trunk $verdir
# revision include
cat <<EOF > $verdir/skychart/revision.inc
// Created by source export for version $version
const RevisionStr = '$rev';
EOF
# download doc
cd $verdir/tools
if [ -f /data/transfert/daily_build/doc_skychart.tgz ]; then
cd doc
tar xzf /data/transfert/daily_build/doc_skychart.tgz
else
./refresh_wiki_doc.sh
fi
cd $builddir
# download jpleph
cd $verdir/BaseData
wget http://sourceforge.net/projects/skychart/files/4-source_data/data_jpleph.tgz
cd $builddir
# tar files
tar cvJf $verdir.tar.xz $verdir
mv $verdir.tar.xz $wd/
cd $wd
rm -rf $builddir