aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-modules
diff options
context:
space:
mode:
authordancer <dancer>2001-09-01 10:01:04 +0000
committerdancer <dancer>2001-09-01 10:01:04 +0000
commitaefe855e979c933b9a9e5b64cc77ea2a0ec8249e (patch)
tree8cc0db7c552b8e5222b9971dc3f8faa3fa5f171a /pbuilder-modules
parent9e78b432cda719251e271c9af4676f8caaf9f11a (diff)
downloadpbuilder-aefe855e979c933b9a9e5b64cc77ea2a0ec8249e.tar
pbuilder-aefe855e979c933b9a9e5b64cc77ea2a0ec8249e.tar.gz
added functions, and moving core functionality to this file.
Diffstat (limited to 'pbuilder-modules')
-rw-r--r--pbuilder-modules52
1 files changed, 47 insertions, 5 deletions
diff --git a/pbuilder-modules b/pbuilder-modules
index 7d836d7..0621d65 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -1,6 +1,38 @@
#! /bin/bash
# common modules for pbuilder.
+function showhelp () {
+ cat <<EOF
+pbuilder - a personal builder
+Copyright 2001 Junichi Uekawa
+Distributed under GNU Public License version 2 or later
+
+pbuilder [operation] [operation options]
+
+command lines:
+pbuilder create [--basetgz base.tgz-path] [--distribution woody|sid]
+ Creates a base.tgz
+
+pbuilder update [--basetgz base.tgz-path] [--distribution woody|sid]
+ Updates a base.tgz
+
+pbuilder build [--basetgz base.tgz-path] pbuilder_2.2.0-1.dsc
+ Builds using the base.tgz. Requires a .dsc filename
+
+pbuilder clean
+ Cleans the temporal build directory.
+
+Operation Options:
+ --basetgz [base.tgz location]
+ --buildplace [location of build]
+ --mirror [mirror location]
+ --http-proxy [proxy]
+ --distribution [distribution(potato/woody/sid)]
+ --buildresult [location-to-copy-build-result]
+EOF
+ exit 1
+}
+
function umountproc () {
if [ "$USEPROC" = "yes" ]; then
echo " -> unmounting proc"
@@ -23,6 +55,20 @@ function cleanbuildplace () {
fi;
}
+function abortingfunction () {
+ # rolling back to abort.
+ umountproc
+ cleanbuildplace
+}
+
+function installaptlines (){
+ echo Installing apt-lines
+ cat > "$BUILDPLACE"/etc/apt/sources.list << EOF
+deb $MIRRORSITE $DISTRIBUTION main contrib non-free
+deb-src $MIRRORSITE debian $DISTRIBUTION main contrib non-free
+EOF
+}
+
function extractbuildplace () {
# after calling this function, umountproc, and cleanbuildplace
# needs to be called.
@@ -39,11 +85,7 @@ function extractbuildplace () {
done
if [ -n "$DISTRIBUTION" ]; then
- echo Installing apt-lines
- cat > "$BUILDPLACE"/etc/apt/sources.list << EOF
-deb $MIRRORSITE $DISTRIBUTION main contrib non-free
-deb-src $MIRRORSITE debian $DISTRIBUTION main contrib non-free
-EOF
+ installaptlines
fi
}