freeswitch/build/modcheck.sh
2014-02-27 14:19:37 -06:00

40 lines
839 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
PATH=$PATH:/bin:/usr/bin
mods=$1
on=''
off=''
prefix=`cat ../config.log | grep ^prefix=\' | awk -F \' '{print $2}'`
mods=${DESTDIR}${prefix}/mod;
if [ -z $mods ] ; then
mods="/usr/local/freeswitch/mod"
fi
echo "Checking module integrity in target [$mods]"
echo
here=`pwd`
cd $mods
files=`ls mod_*.dylib mod_*.so 2>/dev/null`
cd $here
for i in $files ; do
mod=${i%%.*}
infile=`grep ^.*$mod\$ ../modules.conf`
commented=`grep ^\#.*$mod\$ ../modules.conf`
if [ -z "$infile" ] ; then
echo "${on}WARNING: installed module: $i was not installed by this build. It is not present in modules.conf.${off}"
elif [ -n "$commented" ] ; then
echo "${on}WARNING: installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]${off}"
fi
done
echo