File: create_source_dist.sh

package info (click to toggle)
sqlitestudio 3.4.21%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,880 kB
  • sloc: ansic: 406,208; cpp: 123,872; yacc: 2,692; tcl: 497; sh: 462; xml: 426; makefile: 19
file content (38 lines) | stat: -rwxr-xr-x 848 bytes parent folder | download
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
#!/bin/sh

path=trunk
if [ "$1" != "" ]; then
    path=branches/$1
fi

OLDDIR=`pwd`

TEMP=`mktemp -d`
cd $TEMP

#svn co svn://sqlitestudio.pl/sqlitestudio3/$path sqlitestudio
git clone https://github.com/pawelsalawa/sqlitestudio.git sqlitestudio

cd sqlitestudio
rm -rf .git .gitignore

VERSION_INT=`cat SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | grep static | grep sqlitestudioVersion | sed 's/\;//'`
VERSION=`echo $VERSION_INT | awk '{print int($6/10000) "." int($6/100%100) "." int($6%100)}'`

tar cf ../sqlitestudio-$VERSION.tar SQLiteStudio3 Plugins
gzip -9 ../sqlitestudio-$VERSION.tar

zip -r ../sqlitestudio-$VERSION.zip SQLiteStudio3 Plugins

cd "$OLDDIR"

mv $TEMP/sqlitestudio-$VERSION.zip ../output
mv $TEMP/sqlitestudio-$VERSION.tar.gz ../output

cd ../output

rm -rf $TEMP

echo "Source packages stored in `pwd`"

cd "$OLDDIR"