mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-31 18:55:49 +00:00
debian: fix use of bash arrays and display excludes/includes
This commit is contained in:
parent
8ca2ed72b8
commit
c5b6166538
20
debian/bootstrap.sh
vendored
20
debian/bootstrap.sh
vendored
@ -56,16 +56,23 @@ xread () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
avoid_mod_filter () {
|
avoid_mod_filter () {
|
||||||
local mods=("$(eval echo \${avoid_mods_$codename[@]})" "${avoid_mods[@]}")
|
local x="avoid_mods_$codename[@]"
|
||||||
|
local -a mods=("${avoid_mods[@]}" "${!x}")
|
||||||
for x in "${mods[@]}"; do
|
for x in "${mods[@]}"; do
|
||||||
[ "$1" = "$x" ] && return 1
|
if [ "$1" = "$x" ]; then
|
||||||
|
[ "$2" = "show" ] && echo "excluding module $x" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
modconf_filter () {
|
modconf_filter () {
|
||||||
while xread line; do
|
while xread l; do
|
||||||
[ "$1" = "$line" ] && return 0
|
if [ "$1" = "$l" ]; then
|
||||||
|
[ "$2" = "show" ] && echo "including module $l" >&2
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
done < modules.conf
|
done < modules.conf
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@ -78,6 +85,10 @@ mod_filter () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod_filter_show () {
|
||||||
|
mod_filter "$1" show
|
||||||
|
}
|
||||||
|
|
||||||
map_fs_modules () {
|
map_fs_modules () {
|
||||||
local filterfn="$1" percatfns="$2" permodfns="$3"
|
local filterfn="$1" percatfns="$2" permodfns="$3"
|
||||||
for x in $mod_dir/*; do
|
for x in $mod_dir/*; do
|
||||||
@ -806,6 +817,7 @@ echo "Please wait, this takes a few seconds..." >&2
|
|||||||
parse_dir=control-modules.parse
|
parse_dir=control-modules.parse
|
||||||
map_fs_modules ':' 'genmodctl_new_cat' 'genmodctl_new_mod' >> control-modules
|
map_fs_modules ':' 'genmodctl_new_cat' 'genmodctl_new_mod' >> control-modules
|
||||||
parse_mod_control
|
parse_mod_control
|
||||||
|
map_modules 'mod_filter_show' '' ''
|
||||||
(echo "# -*- mode:debian-control -*-"; echo; \
|
(echo "# -*- mode:debian-control -*-"; echo; \
|
||||||
map_modules ':' 'genmodctl_cat' 'genmodctl_mod' \
|
map_modules ':' 'genmodctl_cat' 'genmodctl_mod' \
|
||||||
) > control-modules.gen
|
) > control-modules.gen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user