2012-02-11 13:35:43 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ZNCBUILD=`which znc-buildmod`
|
2012-02-11 20:15:21 -06:00
|
|
|
|
|
|
|
if [ -f logSQLite.buildconfig ]; then
|
|
|
|
. ./logSQLite.buildconfig
|
|
|
|
fi
|
|
|
|
|
2012-02-11 13:35:43 -06:00
|
|
|
if [ "$ZNCBUILD" = "" ]; then
|
|
|
|
echo "Where is znc-buildmod:"
|
|
|
|
read ZNCBUILD
|
|
|
|
if [ "$ZNCBUILD" = "" ]; then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$SQLITE" = "" ]; then
|
2012-02-11 20:15:21 -06:00
|
|
|
echo "Where is SQLite path [/usr]:"
|
|
|
|
read SQLITE
|
|
|
|
if [ "$SQLITE" = "" ]; then
|
|
|
|
SQLITE="/usr"
|
|
|
|
fi
|
2012-02-11 13:35:43 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ZNCCONFIG" = "" ]; then
|
2012-02-11 20:15:21 -06:00
|
|
|
echo "Where is ZNC configuration path [$HOME/.znc]:"
|
|
|
|
read ZNCCONFIG
|
|
|
|
if [ "$ZNCCONFIG" = "" ]; then
|
|
|
|
ZNCCONFIG="$HOME/.znc"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f logSQLite.buildconfig ]; then
|
|
|
|
echo "#!/bin/bash" > logSQLite.buildconfig
|
|
|
|
echo "ZNCBUILD=\"$ZNCBUILD\"" >> logSQLite.buildconfig
|
|
|
|
echo "SQLITE=\"$SQLITE\"" >> logSQLite.buildconfig
|
|
|
|
echo "ZNCCONFIG=\"$ZNCCONFIG\"" >> logSQLite.buildconfig
|
|
|
|
chmod 755 logSQLite.buildconfig
|
2012-02-11 13:35:43 -06:00
|
|
|
fi
|
|
|
|
|
2012-02-11 14:00:33 -06:00
|
|
|
LDFLAGS="-L $SQLITE/lib -lsqlite3 -I $SQLITE/include" "$ZNCBUILD" logsqlite.cpp
|
2012-02-11 13:35:43 -06:00
|
|
|
cp logsqlite.so "$ZNCCONFIG/modules/logsqlite.so"
|