diff options
author | Eddy Petrișor <eddy.petrisor@gmail.com> | 2008-03-03 10:29:33 +0200 |
---|---|---|
committer | Eddy Petrișor <eddy.petrisor@gmail.com> | 2008-03-03 10:41:50 +0200 |
commit | b00822d6d98691b2d60103fd1ccc61498b6cf503 (patch) | |
tree | 5f38bbc831febfc98c287854eb063f808999d651 /debian/pbuilder.postinst | |
parent | 10931c0916f4e380ad57c72385f079a9e6514979 (diff) | |
download | pbuilder-b00822d6d98691b2d60103fd1ccc61498b6cf503.tar pbuilder-b00822d6d98691b2d60103fd1ccc61498b6cf503.tar.gz |
no temp file for sources.list concatenation
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Diffstat (limited to 'debian/pbuilder.postinst')
-rwxr-xr-x | debian/pbuilder.postinst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst index e8ff4a5..9d5a529 100755 --- a/debian/pbuilder.postinst +++ b/debian/pbuilder.postinst @@ -53,12 +53,12 @@ case "$1" in # the "_" alternative is just a safety net, # but that should really never happen if [ -z "$MIRRORSITE" ] || [ "$MIRRORSITE" = "_" ] ; then - TMPSRC=`mktemp` SRCLISTDIR=/etc/apt/sources.list.d - [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list > "$TMPSRC" || true - [ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list >> "$TMPSRC" || true - MIRRORSITE=$(grep -E '^deb ' "$TMPSRC" | head -n 1 | awk '{print $2;}') - rm -f "$TMPSRC" + MIRRORSITE=$( + ( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ; + [ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list || true ) \ + | grep -E '^deb ' | head -n 1 | awk '{print $2;}' + ) while [ -z "$MIRRORSITE" ] ; do db_input high pbuilder/nomirror || true db_input high pbuilder/mirrorsite && RETCODE=$? || RETCODE=$? |