5 if [ ! -f $CONFIG ]; then
6 echo Configuration missing: $CONFIG
7 echo Please set the following variables in $CONFIG
8 echo in you current directory:
10 echo 'VERSION=x.y.z #use desired version'
11 echo 'BRANCH="master" #or e.g. "maintained-release"'
12 echo 'REMOTE="sf" #depending on your git configuration'
23 echo "Getting sources for: vym"
24 echo " Branch: $BRANCH"
25 echo " Branch: $VERSION"
26 echo " Working directory: $OLDDIR"
30 if [ -d $TMPDIR ]; then
31 read -n 1 -p "$TMPDIR exists: Remove it first? [y]" INPUT
32 if [ ! "$INPUT" = "n" ]; then
39 read -n 1 -p "Pull from git repository ? [y]" INPUT
41 if [ "$INPUT" = "n" ]; then
46 read -n 1 -p "Create Documentation? [y]" INPUT
48 if [ "$INPUT" = "n" ]; then
53 read -n 1 -p "Create Tarball? [y]" INPUT
55 if [ "$INPUT" = "n" ]; then
60 echo -n "Remove unpacked sources after creating tarball? [y]"
61 #echo "(do this before \"osc addremove\")"
64 if [ "$INPUT" = "n" ]; then
69 # get data from repository
70 if [ $DO_CHECKOUT = 1 ]; then
72 echo Removing $SRCDIR...
74 git clone -b $BRANCH git://git.code.sf.net/p/vym/code vym
77 #VERSION=$(grep __VYM_VERSION $SRCDIR/version.h | sed -e 's/^.*\"\(.*\)\"$/\1/g')
78 TARBALLSRC=vym-$VERSION
80 echo "Setting version from sources: $VERSION"
83 # create documentation
84 if [ $DO_DOCS = 1 ] ; then
85 cp -ra $SRCDIR/tex $TMPDIR
86 cp -ra $SRCDIR/icons $TMPDIR
87 cp -ra $SRCDIR/flags $TMPDIR
101 if [ $DO_TARBALL = 1 ]; then
102 if [ -d $TARBALLSRC ] ; then
105 cp -ra $SRCDIR $TARBALLSRC
108 mkdir -p $TARBALLSRC/doc
109 cp $TMPDIR/tex/*.pdf $TARBALLSRC/doc
111 rm -rf $TARBALLSRC/.git
112 tar cvjf vym-$VERSION.tar.bz2 $TARBALLSRC
113 if [ $DO_REMOVE = 1 ]; then