Mercurial > hg > sonic-visualiser
comparison deploy/linux/deploy-deb.sh @ 862:129b679734d0
Add deploy script
author | Chris Cannam |
---|---|
date | Wed, 24 Sep 2014 12:08:51 +0100 |
parents | |
children | d47aa2977d7a |
comparison
equal
deleted
inserted
replaced
861:d191ba54592e | 862:129b679734d0 |
---|---|
1 #!/bin/bash | |
2 # | |
3 # Run this from the build root | |
4 | |
5 usage() { | |
6 echo | |
7 echo "Usage:" | |
8 echo | |
9 echo "$0 <version> <architecture>" | |
10 echo | |
11 echo "For example: $0 2.4cc1-1 amd64" | |
12 echo | |
13 exit 2 | |
14 } | |
15 | |
16 version="$1" | |
17 arch="$2" | |
18 | |
19 if [ -z "$version" ] || [ -z "$arch" ]; then | |
20 usage | |
21 fi | |
22 | |
23 program=sonic-visualiser | |
24 depdir=deploy/linux | |
25 | |
26 targetdir="${program}_${version}_${arch}" | |
27 | |
28 echo "Target dir is $targetdir" | |
29 | |
30 if [ -d "$targetdir" ]; then | |
31 echo "Target directory exists, not overwriting" | |
32 exit | |
33 fi | |
34 | |
35 mkdir "$targetdir" | |
36 | |
37 cp -r "$depdir"/deb-skeleton/* "$targetdir"/ | |
38 | |
39 mkdir -p "$targetdir"/usr/bin "$targetdir"/usr/share/pixmaps | |
40 | |
41 cp "$program" "$targetdir"/usr/bin/ | |
42 | |
43 cp icons/sv-icon*.svg "$targetdir"/usr/share/pixmaps/ | |
44 cp "$program".desktop "$targetdir"/usr/share/applications/ | |
45 cp README "$targetdir"/usr/share/doc/"$program"/ | |
46 | |
47 perl -i -p -e "s/Architecture: .*/Architecture: $arch/" "$targetdir"/DEBIAN/control | |
48 | |
49 bash "$depdir"/fix-lintian-bits.sh "$targetdir" | |
50 | |
51 sudo dpkg-deb --build "$targetdir" && lintian "$targetdir".deb | |
52 |