From 18e288fd2c9ef42ee7beff5f6a4eee888f197185 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Wed, 18 Nov 2015 10:00:56 +0100 Subject: [PATCH] common: remove unneccessary 'source's; move extglob.sh to install --- common/environment/install/extglob.sh | 15 +++++++++++++++ common/environment/pkg/extglob.sh | 18 +----------------- common/hooks/do-pkg/00-gen-pkg.sh | 2 -- common/hooks/pre-pkg/99-pkglint.sh | 2 -- 4 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 common/environment/install/extglob.sh mode change 100644 => 120000 common/environment/pkg/extglob.sh diff --git a/common/environment/install/extglob.sh b/common/environment/install/extglob.sh new file mode 100644 index 00000000000..048218c60dc --- /dev/null +++ b/common/environment/install/extglob.sh @@ -0,0 +1,15 @@ +# This provides the extglob function to expand wildcards in the destdir + +expand_destdir() { + local glob_list= result= glob= file= + + for glob; do + glob_list+=" $DESTDIR/$glob" + done + shopt -s extglob + for file in $glob_list; do + result+=" ${file#$DESTDIR/}" + done + shopt -u extglob + echo $result +} diff --git a/common/environment/pkg/extglob.sh b/common/environment/pkg/extglob.sh deleted file mode 100644 index be620cec704..00000000000 --- a/common/environment/pkg/extglob.sh +++ /dev/null @@ -1,17 +0,0 @@ -# This provides the extglob function to expand wildcards in the destdir - -expand_destdir() { - local glob_list= result= glob= file= - - for glob; do - glob_list+=" $DESTDIR/$glob" - done - shopt -s extglob - for file in $glob_list; do - result+=" ${file#$DESTDIR/}" - done - shopt -u extglob - echo $result -} - - diff --git a/common/environment/pkg/extglob.sh b/common/environment/pkg/extglob.sh new file mode 120000 index 00000000000..727ffaf5645 --- /dev/null +++ b/common/environment/pkg/extglob.sh @@ -0,0 +1 @@ +../install/extglob.sh \ No newline at end of file diff --git a/common/hooks/do-pkg/00-gen-pkg.sh b/common/hooks/do-pkg/00-gen-pkg.sh index 8ffa91d8e5a..ab010ff42f8 100644 --- a/common/hooks/do-pkg/00-gen-pkg.sh +++ b/common/hooks/do-pkg/00-gen-pkg.sh @@ -1,7 +1,5 @@ # This hook generates a XBPS binary package from an installed package in destdir. -source ${XBPS_COMMONDIR}/environment/pkg/extglob.sh - genpkg() { local pkgdir="$1" arch="$2" desc="$3" pkgver="$4" binpkg="$5" local _preserve _deps _shprovides _shrequires _gitrevs _provides _conflicts diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index d584b78d7a1..e9015e25365 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -1,7 +1,5 @@ # This hook checks for common issues related to void. -source ${XBPS_COMMONDIR}/environment/pkg/extglob.sh - hook() { local error=0 filename= rev= libname= conflictPkg= conflictFile= local conflictRev= ignore= found= mapshlibs=$XBPS_COMMONDIR/shlibs