mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-20 13:21:28 +00:00
Improved (mainly rewrote) pbuilder-dist. (Other insignificant changes.)
This commit is contained in:
parent
49cbb653f3
commit
3d458054e6
113
pbuilder-dist
113
pbuilder-dist
@ -1,11 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Jamin W. Collins <jcollins@asgardsrealm.net>
|
# Copyright (C) Jamin W. Collins <jcollins@asgardsrealm.net>
|
||||||
# License: Public Domain
|
# and Jordan Mantha <mantha@ubuntu.com>
|
||||||
|
# Copyright 2007 (C) Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||||
|
# License: GPLv2 or later
|
||||||
#
|
#
|
||||||
# This script is a wrapper to use pbuilder with many different
|
# This script is a wrapper to use pbuilder with many different
|
||||||
# distributions / versions.
|
# distributions / versions.
|
||||||
#
|
#
|
||||||
# Name this script 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', etc.
|
# If you want to use this copy of the script only for a single distribution
|
||||||
|
# / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy',
|
||||||
|
# or whatever it is.
|
||||||
#
|
#
|
||||||
# The only variable you really might need to change is BASE_DIR, if you
|
# The only variable you really might need to change is BASE_DIR, if you
|
||||||
# don't want pbuilder stuff in your home directory.
|
# don't want pbuilder stuff in your home directory.
|
||||||
@ -14,34 +18,85 @@
|
|||||||
|
|
||||||
BASE_DIR="$HOME/pbuilder"
|
BASE_DIR="$HOME/pbuilder"
|
||||||
|
|
||||||
OPERATION=$1
|
if [ ! -z `echo \`basename $0\` | grep '-'` ]
|
||||||
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
|
then
|
||||||
PROCEED=false
|
if [ $# -lt 1 ]
|
||||||
|
then
|
||||||
|
echo "Insufficient number of arguments."
|
||||||
|
echo "Usage: $0 <operation>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
case $OPERATION in
|
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
|
||||||
create|update|build|clean|login|execute )
|
OPERATION=$1
|
||||||
PROCEED=true
|
shift 1
|
||||||
;;
|
else
|
||||||
|
if [ $# -lt 2 ]
|
||||||
|
then
|
||||||
|
echo "Insufficient number of arguments."
|
||||||
|
echo "Usage: $0 <distribution> <operation>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISTRIBUTION=$1
|
||||||
|
OPERATION=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
case $DISTRIBUTION in
|
||||||
|
#warty|hoary|breezy)
|
||||||
|
dapper|edgy|feisty|gutsy)
|
||||||
|
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||||
|
COMPONENTS="universe multiverse"
|
||||||
|
;;
|
||||||
|
|
||||||
|
oldstable|sarge|stable|etch|testing|lenny|unstable|sid|experimental)
|
||||||
|
ARCHIVE="http://ftp.debian.org"
|
||||||
|
COMPONENTS="main contrib non-free"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Warning: Unknown distribution «$DISTRIBUTION»."
|
||||||
|
echo -n "Continue [y/N]? "
|
||||||
|
read continue
|
||||||
|
|
||||||
|
if [ "$continue" != 'y' ] && [ "$continue" != 'Y' ]
|
||||||
|
then
|
||||||
|
echo " Aborting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||||
|
COMPONENTS="universe multiverse"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $PROCEED = true ]]; then
|
|
||||||
shift
|
case $OPERATION in
|
||||||
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]
|
create|update|build|clean|login|execute)
|
||||||
then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/
|
;;
|
||||||
fi
|
|
||||||
sudo pbuilder $OPERATION \
|
*)
|
||||||
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
|
echo "Unrecognized argument. Please use one of those:"
|
||||||
--distribution $DISTRIBUTION \
|
echo " create"
|
||||||
--buildresult $BASE_DIR/$DISTRIBUTION_result \
|
echo " update"
|
||||||
--othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" $@
|
echo " build"
|
||||||
else
|
echo " clean"
|
||||||
echo "Invalid command..."
|
echo " login"
|
||||||
echo "Valid commands are:"
|
echo " execute"
|
||||||
echo " create"
|
exit 1
|
||||||
echo " update"
|
;;
|
||||||
echo " build"
|
esac
|
||||||
echo " clean"
|
|
||||||
echo " login"
|
|
||||||
echo " execute"
|
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]
|
||||||
exit 1
|
then
|
||||||
|
mkdir -p $BASE_DIR/${DISTRIBUTION}_result
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sudo pbuilder $OPERATION \
|
||||||
|
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
|
||||||
|
--distribution $DISTRIBUTION \
|
||||||
|
--buildresult $BASE_DIR/$DISTRIBUTION_result \
|
||||||
|
--othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2007 (C) Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
# Copyright 2007 (C) Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||||
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
||||||
# License: GPL v3 or later
|
# License: GPLv3 or later
|
||||||
#
|
#
|
||||||
# This script outputs a list of files which are not common source files. This
|
# This script outputs a list of files which are not common source files. This
|
||||||
# should be run in the root of a source tree to find files which might not be
|
# should be run in the root of a source tree to find files which might not be
|
||||||
|
@ -26,7 +26,7 @@ if [ -f debian/control -a -f debian/changelog ]; then
|
|||||||
elif [ -f control -a -f changelog ]; then
|
elif [ -f control -a -f changelog ]; then
|
||||||
DEBIANDIR=.
|
DEBIANDIR=.
|
||||||
else
|
else
|
||||||
echo "Please run that script in the source folder." >&2 && exit 1
|
echo "Please execute «$0» in the source folder." >&2 && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au"
|
IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2006-2007 (C) Kees Cook <kees@ubuntu.com>
|
# Copyright 2006-2007 (C) Kees Cook <kees@ubuntu.com>
|
||||||
# Modified by Siegfried-A. Gevatter <rainct@ubuntuwire.com>
|
# Modified by Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||||
# License: GPLv2
|
# License: GPLv2
|
||||||
|
|
||||||
if [[ -d debian ]]; then
|
if [[ -d debian ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user