common: move expand_destdir to environment/pkg; change lint check.

This commit is contained in:
Enno Boland 2015-11-18 09:44:34 +01:00
parent 67757b5708
commit ef24b7b7cc
4 changed files with 23 additions and 15 deletions

View file

@ -0,0 +1,17 @@
# 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
}