From 1667c062b816c3c0f973be2ed00e973354ff2f23 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 30 Dec 2009 22:33:30 +0100 Subject: [PATCH] Fix conditionals for $build_wrksrc. --HG-- extra : convert_revision : c85c8bed3cf76b909ae08b40bb73e9585e9656dc --- xbps-src/shutils/build_funcs.sh | 4 +++- xbps-src/shutils/configure_funcs.sh | 4 +++- xbps-src/shutils/install_funcs.sh | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xbps-src/shutils/build_funcs.sh b/xbps-src/shutils/build_funcs.sh index 866570edd0e..57d6b2093d1 100644 --- a/xbps-src/shutils/build_funcs.sh +++ b/xbps-src/shutils/build_funcs.sh @@ -44,7 +44,9 @@ build_src_phase() [ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]" cd $wrksrc || return 1 - [ -n "$build_wrksrc" ] && cd $build_wrksrc || return 1 + if [ -n "$build_wrksrc" ]; then + cd $build_wrksrc || return 1 + fi [ -n "$revision" ] && pkg="${pkg}_${revision}" diff --git a/xbps-src/shutils/configure_funcs.sh b/xbps-src/shutils/configure_funcs.sh index be8fdb75cf6..5bbca35dd69 100644 --- a/xbps-src/shutils/configure_funcs.sh +++ b/xbps-src/shutils/configure_funcs.sh @@ -69,7 +69,9 @@ configure_src_phase() [ -z "$configure_script" ] && configure_script="./configure" cd $wrksrc || return 1 - [ -n "$build_wrksrc" ] && cd $build_wrksrc || return 1 + if [ -n "$build_wrksrc" ]; then + cd $build_wrksrc || return 1 + fi . $XBPS_SHUTILSDIR/buildvars_funcs.sh set_build_vars diff --git a/xbps-src/shutils/install_funcs.sh b/xbps-src/shutils/install_funcs.sh index c7a8bd979a4..89504b33294 100644 --- a/xbps-src/shutils/install_funcs.sh +++ b/xbps-src/shutils/install_funcs.sh @@ -71,8 +71,10 @@ install_src_phase() saved_wrksrc=$wrksrc cd $wrksrc || msg_error "can't change cwd to wrksrc!" - [ -n "$build_wrksrc" ] && cd $build_wrksrc \ - || msg_error "can't change cwd to build_wrksrc!" + if [ -n "$build_wrksrc" ]; then + cd $build_wrksrc \ + || msg_error "can't change cwd to build_wrksrc!" + fi # Run pre_install func. run_func pre_install || msg_error "pre_install stage failed!"