mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-28 09:38:30 +00:00
Refactor out file merge function
This commit is contained in:
parent
714eb245fd
commit
75481f6398
21
debian/bootstrap.sh
vendored
21
debian/bootstrap.sh
vendored
@ -1142,6 +1142,18 @@ set_modules_non_dfsg () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conf_merge () {
|
||||||
|
local of="$1" if="$2"
|
||||||
|
if [ -s $if ]; then
|
||||||
|
grep -v '^##\|^$' $if | while xread x; do
|
||||||
|
touch $of
|
||||||
|
if ! grep -e "$x" $of >/dev/null; then
|
||||||
|
printf '%s\n' "$x" >> $of
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
codename="sid"
|
codename="sid"
|
||||||
modulelist_opt=""
|
modulelist_opt=""
|
||||||
while getopts "c:m:" o; do
|
while getopts "c:m:" o; do
|
||||||
@ -1194,14 +1206,7 @@ map_modules "mod_filter" \
|
|||||||
echo "Generating debian/ (-all package)..." >&2
|
echo "Generating debian/ (-all package)..." >&2
|
||||||
grep -e '^Package:' control | grep -v '^freeswitch-all$' | while xread l; do
|
grep -e '^Package:' control | grep -v '^freeswitch-all$' | while xread l; do
|
||||||
m="${l#*: }"
|
m="${l#*: }"
|
||||||
f=$m.install
|
conf_merge freeswitch-all.install $m.install
|
||||||
if [ -s $f ]; then
|
|
||||||
grep -v '^##\|^$' $f | while xread x; do
|
|
||||||
if ! grep -e "$x" freeswitch-all.install >/dev/null; then
|
|
||||||
printf '%s\n' "$x" >> freeswitch-all.install
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
for x in postinst postrm preinst prerm; do
|
for x in postinst postrm preinst prerm; do
|
||||||
cp -a freeswitch.$x freeswitch-all.$x
|
cp -a freeswitch.$x freeswitch-all.$x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user