forked from clementine-player/Clementine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuploadtoppa.sh
executable file
·45 lines (35 loc) · 946 Bytes
/
uploadtoppa.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
#!/bin/sh -e
REFSPEC=$1
DIST=$2
if [ -z "$REFSPEC" -o -z "$DIST" ]; then
echo "Usage: $0 <refspec> <dist>"
echo "Example: $0 tags/0.7 natty"
exit 1
fi
PPA=ppa:me-davidsansome/clementine
REPO=https://github.com/clementine-player/Clementine
BASE=`pwd`
DIRECTORY=clementine
# Cleanup any old stuff
rm -rfv $BASE/$DIRECTORY $BASE/*.diff.*z $BASE/*.tar.*z $BASE/*.dsc $BASE/*_source.changes
# Checkout
git clone $REPO $DIRECTORY
cd $BASE/$DIRECTORY
git checkout $REFSPEC
# Generate changelog and maketarball.sh
mkdir $BASE/$DIRECTORY/bin
cd $BASE/$DIRECTORY/bin
cmake .. -DDEB_DIST=$DIST -DWITH_DEBIAN=ON
rm -rfv $BASE/$DIRECTORY/bin/*
# Create the tarball
cd $BASE/$DIRECTORY/dist
./maketarball.sh
mv -v $BASE/$DIRECTORY/dist/*.orig.tar.xz $BASE/
rm -v $BASE/$DIRECTORY/dist/*.tar.*z
rm -vrf $BASE/$DIRECTORY/.git
# Build the deb
cd $BASE/$DIRECTORY
dpkg-buildpackage -S -kF6ABD82E
# Upload to ppa
cd $BASE
dput $PPA *_source.changes