aboutsummaryrefslogtreecommitdiff
path: root/common/environment/install/extglob.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common/environment/install/extglob.sh')
-rw-r--r--common/environment/install/extglob.sh15
1 files changed, 15 insertions, 0 deletions
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
+}