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

« back to all changes in this revision

Viewing changes to scripts/update_vcs_fields.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
MSG='Update vcs fields.'
 
4
 
 
5
for path in $(arriero list -f path "$@"); do
 
6
    echo $path;
 
7
    (
 
8
        cd $path
 
9
        change=0
 
10
        if grep -q '^Vcs-Browser:\s*http:\/\/git\.debian\.org' debian/control;
 
11
        then
 
12
            sed -i 's/^Vcs-Browser:\s*http:\/\/git\.debian\.org/Vcs-Browser: http:\/\/anonscm.debian.org\/gitweb/' debian/control
 
13
            change=1
 
14
        fi
 
15
        if grep -q '^Vcs-Git:\s*git:\/\/git\.debian\.org' debian/control;
 
16
        then
 
17
            sed -i 's/^Vcs-Git:\s*git:\/\/git\.debian\.org/Vcs-Git: git:\/\/anonscm.debian.org/' debian/control
 
18
            change=1
 
19
        fi
 
20
        if [ $change -gt 0 ]; then
 
21
            dch "$MSG";
 
22
            git commit -a -m "$MSG"
 
23
        fi
 
24
    )
 
25
done