summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2015-07-02 11:51:32 +0200
committerJean Delvare <jdelvare@suse.de>2015-07-02 11:51:32 +0200
commita87ebb916a98dd8434d194a6c95ed03b7eef6615 (patch)
tree51cb8c3db87661f53192db246131de432722cffd
parent311e3e68dbc149b14dff9ff787806b4dd9f788ce (diff)
downloadquilt-a87ebb916a98dd8434d194a6c95ed03b7eef6615.tar.gz
setup: Reorder code in function inspect()
Reorder the code in function inspect() to avoid testing for the same condition twice.
-rw-r--r--quilt/setup.in20
1 files changed, 8 insertions, 12 deletions
diff --git a/quilt/setup.in b/quilt/setup.in
index 0db8c73..41a2d9a 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -220,17 +220,6 @@ inspect()
ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/patch
ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/tar
ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/unzip
- if [ -n "$targetdir" ]
- then
- # Fast mode
- export QUILT_SETUP_FAST=1
- [ -d "$targetdir" ] || mkdir -p "$targetdir" || exit 1
- ln -s "$targetdir" $tmpdir/build
- else
- # Standard mode
- mkdir -p $tmpdir/build
- fi
- export -f normalize_path dir_to_dir
# Redirect file descriptors
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
@@ -241,12 +230,19 @@ inspect()
exec 3>&1 4>&2 5>/dev/null
fi
- if [ -n "$QUILT_SETUP_FAST" ]
+ if [ -n "$targetdir" ]
then
+ # Fast mode
+ export QUILT_SETUP_FAST=1
+ [ -d "$targetdir" ] || mkdir -p "$targetdir" || exit 1
+ ln -s "$targetdir" $tmpdir/build
export -f create_md5sums
else
+ # Standard mode
+ mkdir -p $tmpdir/build
create_md5sums "$sourcedir" $tmpdir/md5sums
fi
+ export -f normalize_path dir_to_dir
# let rpm do all the dirty specfile stuff ...
echo -n "### rpmbuild: " >&4