LogSQL/buildLogSQLite

42 lines
948 B
Plaintext
Raw Permalink Normal View History

2012-02-11 13:35:43 -06:00
#!/bin/bash
ZNCBUILD=`which znc-buildmod`
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
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
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
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"