~ubuntu-branches/debian/stretch/arriero/stretch

« back to all changes in this revision

Viewing changes to scripts/bump_debhelper.sh

  • Committer: Package Import Robot
  • Author(s): Margarita Manterola
  • Date: 2014-03-15 18:30:59 UTC
  • Revision ID: package-import@ubuntu.com-20140315183059-nap87isjg53t0tcf
Tags: upstream-0.5.1
ImportĀ upstreamĀ versionĀ 0.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
for path in $(arriero list -f path "$@"); do
 
4
    echo $path
 
5
    (
 
6
        cd $path
 
7
        changes=0
 
8
        if [ $(cat debian/compat) -lt 9 ]; then
 
9
            echo 9 > debian/compat
 
10
            changes=1
 
11
        fi
 
12
        dhv=$(sed -n -r 's!.*\W(debhelper\s+\(>= ([^)]+)\)).*!\2!p' debian/control)
 
13
        if [ $dhv != "9" ]; then
 
14
            sed -i -r 's!(\Wdebhelper\s+\(>=) [^)]+\)!\1 9)!' debian/control
 
15
            changes=1
 
16
        fi
 
17
 
 
18
        if [ $changes -gt 0 ]; then
 
19
            dch 'Bump debhelper build-dep and compat to 9.'
 
20
            git commit -a -m 'Bump debhelper build-dep and compat to 9.'
 
21
        fi
 
22
    )
 
23
done