aboutsummaryrefslogtreecommitdiff
path: root/debian/pbuilder.postinst
diff options
context:
space:
mode:
authorEddy Petrisor <eddy@bounty.eddyp.homelinux.net>2007-06-25 21:33:07 +0300
committerEddy Petrisor <eddy@bounty.eddyp.homelinux.net>2007-06-28 02:19:58 +0300
commite4dc31110bf491251462a0b9db3584e91652388c (patch)
treea4b1a89d945838363c7d6cce760aca73de739889 /debian/pbuilder.postinst
parentec019d66e64a272e80afd585c2f64700dfd034d0 (diff)
downloadpbuilder-e4dc31110bf491251462a0b9db3584e91652388c.tar
pbuilder-e4dc31110bf491251462a0b9db3584e91652388c.tar.gz
do not overwrite custom pbuilderrc files, only the default
Diffstat (limited to 'debian/pbuilder.postinst')
-rwxr-xr-xdebian/pbuilder.postinst4
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst
index 9e83c80..c3f6ac1 100755
--- a/debian/pbuilder.postinst
+++ b/debian/pbuilder.postinst
@@ -30,6 +30,10 @@ case "$1" in
if [ "$MIRRORSITE" = "_" ]
then
+ # if there is a custom file, then we shouldn't touch it
+ CURRENTMIRROR=$(grep -E "MIRRORSITE=" "$CONFFILE" | sed 's#MIRRORSITE=##g')
+ [ "$CURRENTMIRROR" = "_" ] || exit 0
+
MIRRORSITE=$(grep -E '^deb ' /etc/apt/sources.list | head -n 1 | awk '{print $2;}')
db_set pbuilder/mirrorsite "$MIRRORSITE"
db_input medium pbuilder/mirrorsite || true