Ubuntu Pastebin

Paste from barry at Fri, 14 Oct 2016 15:08:45 +0000

Download as text
 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
#!/bin/bash

set -e

pkgname=$1
if [ -z $pkgname ]; then
    echo "Usage: $0 <srcpkgname> [<distro> [<dest>]]"
    exit 1
fi

distro=${2:-sid}
dest=${3:-${pkgname}.${distro}}

here=`pwd`

echo "getting $pkgname for $distro"
echo "updating chdist"
chdist apt-get $distro update -qq

where=`mktemp -d`
function cleanup {
    echo "cleaning $where"
    rm -rf $where
}
trap cleanup EXIT

echo "putting source in $where"
cd $where
chdist apt-get $distro source -qq $pkgname
cd $here

echo "git import to directory $dest"
git init $dest
cd $dest
gbp import-dsc $where/*.dsc
Download as text