rendered paste body#!/bin/sh
. /lib/lsb/init-functions
CLAWS_CVS="claws-cvs"
PLUGDIR="plugins"
cd sylpheedclaws
log_daemon_msg "updating claws cvs tree..(can take long time)"
cvsok=$(cvs update > /dev/null)
log_end_msg $?
cd ..
if [ !cvsok ]; then
log_daemon_msg "copying..."
cp -ru sylpheedclaws/ $CLAWS_CVS
log_end_msg $?
if [ -f $CLAWS_CVS/sylpheed-claws/Makefile ]; then
log_daemon_msg "compiling $CLAWS_CVS.."
cd $CLAWS_CVS/sylpheed-claws
make > /dev/null && sudo make install > /dev/null
log_end_msg $?
else
log_daemon_msg "configure & compiling $CLAWS_CVS.."
cd $CLAWS_CVS/sylpheed-claws
./autogen.sh --prefix=/usr --disable-libetpan > /dev/null && make > /dev/null && sudo make install > /dev/null
log_end_msg $?
fi
cd ..
cd $PLUGDIR
for PLUGIN in rssyl gtkhtml2_viewer pdf_viewer; do
if [ -f $PLUGIN/Makefile ]; then
log_daemon_msg "compiling $PLUGIN.."
cd $PLUGIN
make > /dev/null && sudo make install > /dev/null
log_end_msg $?
else
log_daemon_msg "configure & compiling $PLUGIN.."
cd $PLUGIN
./autogen.sh --prefix=/usr > /dev/null && make > /dev/null && sudo make install > /dev/null
log_end_msg $?
fi
cd ..
done
else
log_daemon_msg "cleaning source tree..."
rm -r sylpheedclaws/plugins sylpheedclaws/sylpheed-claws
log_end_msg $?
fi
echo "done."
exit 0