mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
run module integrity check post-build
This commit is contained in:
parent
fdd4974189
commit
159f577b7f
@ -70,7 +70,7 @@ install:
|
|||||||
@echo " + +"
|
@echo " + +"
|
||||||
@echo " +-------------------------------------------------+"
|
@echo " +-------------------------------------------------+"
|
||||||
@cat ../cluecon2.tmpl
|
@cat ../cluecon2.tmpl
|
||||||
|
@sh modcheck.sh $(modulesdir)
|
||||||
|
|
||||||
.PHONY: check dvi html info install-data \
|
.PHONY: check dvi html info install-data \
|
||||||
install-dvi install-exec install-html install-info install-pdf install-ps installcheck installdirs pdf \
|
install-dvi install-exec install-html install-info install-pdf install-ps installcheck installdirs pdf \
|
||||||
|
43
build/modcheck.sh
Normal file
43
build/modcheck.sh
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=$PATH:/bin:/usr/bin
|
||||||
|
mods=$1
|
||||||
|
|
||||||
|
if [ -z $mods ] ; then
|
||||||
|
mods="/usr/local/freeswitch/mod"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "Checking module integrity in target [$mods]"
|
||||||
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
here=`pwd`
|
||||||
|
|
||||||
|
cd $mods
|
||||||
|
files=`ls *.dylib *.so 2>/dev/null`
|
||||||
|
cd $here
|
||||||
|
|
||||||
|
alert() {
|
||||||
|
|
||||||
|
/bin/echo -ne "\e[00;35m"
|
||||||
|
echo WARNING: $1
|
||||||
|
/bin/echo -ne '\e[00m'
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in $files ; do
|
||||||
|
mod=${i%%.*}
|
||||||
|
|
||||||
|
infile=`grep ^.*$mod\$ ../modules.conf`
|
||||||
|
commented=`grep ^\#.*$mod\$ ../modules.conf`
|
||||||
|
|
||||||
|
if [ -z "$infile" ] ; then
|
||||||
|
alert "installed module: $i was not installed by this build. It is not present in modules.conf."
|
||||||
|
elif [ -n "$commented" ] ; then
|
||||||
|
alert "installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
echo
|
Loading…
x
Reference in New Issue
Block a user