~fginther/ppa-dev-tools/ppa_sync-fix-source-package-search

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
51
52
53
54
55
56
#!/bin/bash

# Usage:  ppa-put <*~lp###~*.changes>
#
# Uploads a .changes file to a PPA following the lp### spec, named
# something like:
#   xf86-input-wacom_0.11.0-0ubuntu2~lp787781~1_source.changes

# TODO:  If no *.changes given, but there is a debian/changelog
#        with an appropriate version number, then run debuild -S

changes=$1
lpusername=bryce

if [ -z "${changes}" ] || [ "${changes/~lp*~/}" = "${changes}" ]; then
   echo "Usage: ppa-put <*~lp###~*.changes>"
   echo
   echo "Note ~lpNNNNNN~ syntax!"
fi
prefix=${changes%~lp*~*}
postfix=${changes#*~lp*~}
basepkg=${changes%~${postfix}}
bugnum=${basepkg#${prefix}~lp}

# TODO:  Print out the name of the PPA being uploaded to

# TODO:  If it doesn't exist, run ppa-create if -c specified

# TODO: Update the PPA description, copying in the description
#       from the .changes file

# TODO: Parse the changes from the changelog
#changes=""

# TODO: Update the PPA name using the bug title
#desc="""
#This PPA includes the following solution to bug ${bugnum}:
#
#${changes}
#
#(LP: #{$bugnum})
#"""

# TODO: Check if .changes was properly signed; if not, offer to sign it

options="-f"
# -f  Force putting package, even if it's already there, since this is just a PPA

ppa="ppa:${lpusername}/lp${bugnum}"

echo dput ${options} ${ppa} ${changes}
dput ${options} ${ppa} ${changes}

echo
echo "To watch build progress run:"
echo "ppa-wait ${ppa}"