diff --git a/xbps-src/shutils/build_funcs.sh b/xbps-src/shutils/build_funcs.sh index 5dc75c2114c..9ee867129fe 100644 --- a/xbps-src/shutils/build_funcs.sh +++ b/xbps-src/shutils/build_funcs.sh @@ -34,7 +34,7 @@ build_src_phase() [ -z $pkgname -o -z $version ] && return 1 # Skip this phase for meta-template style builds. - [ "$build_style" = "meta-template" ] && return 0 + [ -m "$build_style" -a "$build_style" = "meta-template" ] && return 0 [ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]\n" diff --git a/xbps-src/shutils/configure_funcs.sh b/xbps-src/shutils/configure_funcs.sh index 5a63bea1dd6..674d3df43d9 100644 --- a/xbps-src/shutils/configure_funcs.sh +++ b/xbps-src/shutils/configure_funcs.sh @@ -35,7 +35,7 @@ configure_src_phase() [ -z $pkgname ] && return 1 # Skip this phase for meta-template style builds. - [ "$build_style" = "meta-template" ] && return 0 + [ -n "$build_style" -a "$build_style" = "meta-template" ] && return 0 cd $wrksrc || msg_error "unexistent build directory [$wrksrc].\n" diff --git a/xbps-src/shutils/fetch_funcs.sh b/xbps-src/shutils/fetch_funcs.sh index 7f446b811d3..d9daac38dba 100644 --- a/xbps-src/shutils/fetch_funcs.sh +++ b/xbps-src/shutils/fetch_funcs.sh @@ -55,7 +55,7 @@ fetch_distfiles() # # There's nothing of interest if we are a meta template. # - [ "$build_style" = "meta-template" ] && return 0 + [ -n "$build_style" -a "$build_style" = "meta-template" ] && return 0 [ -f "$XBPS_FETCH_DONE" ] && return 0 diff --git a/xbps-src/shutils/metadata.sh b/xbps-src/shutils/metadata.sh index 32d114c1d49..fdc8ffc588c 100644 --- a/xbps-src/shutils/metadata.sh +++ b/xbps-src/shutils/metadata.sh @@ -56,7 +56,7 @@ xbps_write_metadata_pkg() xbps_write_metadata_pkg_real done - if [ "$build_style" = "meta-template" -a -z "${run_depends}" ]; then + if [ -n "$build_style" -a "$build_style" = "meta-template" -a -z "${run_depends}" ]; then for spkg in ${subpackages}; do if [ -n "${revision}" ]; then spkgrev="${spkg}-${version}_$revision" diff --git a/xbps-src/shutils/stow_funcs.sh b/xbps-src/shutils/stow_funcs.sh index f03fb1387c5..384fb567dff 100644 --- a/xbps-src/shutils/stow_funcs.sh +++ b/xbps-src/shutils/stow_funcs.sh @@ -75,7 +75,7 @@ stow_pkg_real() msg_error "cannot stow $pkgname! (permission denied)\n" fi - if [ "$build_style" = "meta-template" ]; then + if [ -n "$build_style" -a "$build_style" = "meta-template" ]; then [ ! -d ${DESTDIR} ] && mkdir -p ${DESTDIR} fi diff --git a/xbps-src/shutils/tmpl_funcs.sh.in b/xbps-src/shutils/tmpl_funcs.sh.in index 2af2a3aac45..647101ca21a 100644 --- a/xbps-src/shutils/tmpl_funcs.sh.in +++ b/xbps-src/shutils/tmpl_funcs.sh.in @@ -245,7 +245,7 @@ prepare_tmpl() REQ_VARS="pkgname version short_desc long_desc" - if [ "$build_style" = "meta-template" ]; then + if [ -n "$build_style" -a "$build_style" = "meta-template" ]; then nofetch=yes noextract=yes fi