83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
1 |
#!/bin/sh
|
2 |
#
|
|
3 |
# Copyright (C) Jamin W. Collins <jcollins@asgardsrealm.net>
|
|
4 |
# Copyright (C) Jordan Mantha <mantha@ubuntu.com>
|
|
5 |
#
|
|
135
by Siegfried-Angel Gevatter Pujals
Remove unneeded AUTHORS and README. Add the GPL header to all scripts. |
6 |
# ##################################################################
|
7 |
#
|
|
8 |
# This program is free software; you can redistribute it and/or
|
|
9 |
# modify it under the terms of the GNU General Public License
|
|
10 |
# as published by the Free Software Foundation; either version 2
|
|
11 |
# of the License, or (at your option) any later version.
|
|
820
by Benjamin Drung
Remove all trailing spaces. |
12 |
#
|
135
by Siegfried-Angel Gevatter Pujals
Remove unneeded AUTHORS and README. Add the GPL header to all scripts. |
13 |
# This program is distributed in the hope that it will be useful,
|
14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 |
# GNU General Public License for more details.
|
|
820
by Benjamin Drung
Remove all trailing spaces. |
17 |
#
|
135
by Siegfried-Angel Gevatter Pujals
Remove unneeded AUTHORS and README. Add the GPL header to all scripts. |
18 |
# See file /usr/share/common-licenses/GPL for more details.
|
19 |
#
|
|
20 |
# ##################################################################
|
|
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
21 |
#
|
22 |
# This script is a wrapper to be able to easily use pbuilder for
|
|
977
by Stefano Rivera
pbuilder-dist-simple: Remove all mention of supporting Debian. |
23 |
# different Ubuntu distributions (eg, Lucid, Natty, etc).
|
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
24 |
#
|
977
by Stefano Rivera
pbuilder-dist-simple: Remove all mention of supporting Debian. |
25 |
# Create symlinks to this script naming them 'pbuilder-lucid',
|
26 |
# 'pbuilder-natty', etc. If you want additional features try out the more
|
|
27 |
# advanced script 'pbuilder-dist'.
|
|
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
28 |
|
29 |
OPERATION=$1 |
|
30 |
DISTRIBUTION=`basename $0 | cut -f2 -d '-'` |
|
31 |
PROCEED=false |
|
32 |
BASE_DIR="$HOME/pbuilder" |
|
1309.1.6
by Stefano Rivera
pbuilder-dist-simple: Display help |
33 |
|
34 |
usage() { |
|
35 |
prog=$(basename $0) |
|
36 |
cat <<EOF
|
|
37 |
Usage: $prog command [pbuilder-options...]
|
|
38 |
||
39 |
A simple multi-release pbuilder wrapper
|
|
40 |
||
41 |
Valid commands are:
|
|
42 |
create
|
|
43 |
update
|
|
44 |
build
|
|
45 |
clean
|
|
46 |
login
|
|
47 |
execute
|
|
48 |
||
49 |
Options:
|
|
50 |
-h, --help show this help message and exit
|
|
51 |
EOF
|
|
52 |
exit $1 |
|
53 |
}
|
|
54 |
||
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
55 |
case $OPERATION in |
1309.1.6
by Stefano Rivera
pbuilder-dist-simple: Display help |
56 |
create|update|build|clean|login|execute) |
57 |
;;
|
|
58 |
-h|--help) |
|
59 |
usage 0
|
|
60 |
;;
|
|
61 |
*)
|
|
62 |
usage 1
|
|
63 |
;;
|
|
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
64 |
esac
|
1309.1.6
by Stefano Rivera
pbuilder-dist-simple: Display help |
65 |
shift
|
66 |
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]; then |
|
67 |
mkdir -p $BASE_DIR/${DISTRIBUTION}_result/ |
|
83
by Siegfried-Angel Gevatter Pujals
Add pbuilder-dist-simple. |
68 |
fi
|
1309.1.6
by Stefano Rivera
pbuilder-dist-simple: Display help |
69 |
sudo pbuilder $OPERATION \ |
70 |
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ |
|
71 |
--distribution $DISTRIBUTION \ |
|
72 |
--buildresult $BASE_DIR/$DISTRIBUTION_result \ |
|
73 |
--othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" "$@" |