Files
i2p.i2p/Slackware/i2p/doinst.sh

73 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
2009-02-01 07:51:38 +00:00
INST_DIR=directory
( cd install
echo
for i in *.config ; {
if [ -f $INST_DIR/$i ] ; then
2012-03-13 19:54:07 +00:00
echo "Please check ${INST_DIR}${i}, as there is a new version."
2009-02-01 07:51:38 +00:00
cp $i $INST_DIR/$i.new
else
cp $i $INST_DIR/$i
fi
}
)
( cd $INST_DIR
if [ -f blocklist.txt ] ; then
echo "Please check ${INST_DIR}blocklist.txt, as there is a new version."
else
mv blocklist.txt.new blocklist.txt
fi
)
( cd $INST_DIR/eepsite
if [ -f jetty.xml ] ; then
2012-03-11 23:54:02 +00:00
echo "Please check ${INST_DIR}/eepsite, as there are new files."
else
2012-03-11 23:54:02 +00:00
find $PKG/$INSTALL_DIR/i2p -name "*.xml.new" -exec sh -c 'mv "$0" "${0/.new}"' {} \;
fi
)
( cd $INST_DIR/eepsite/docroot
if [ -f index.html ] ; then
rm index.html.new
else
mv index.html.new index.html
fi
if [ -f favicon.ico ] ; then
rm favicon.ico.new
else
mv favicon.ico.new favicon.ico
fi
)
2009-02-01 07:51:38 +00:00
echo
echo "FINISHING I2P INSTALLATION. PLEASE WAIT."
cd $INST_DIR
2009-07-15 08:51:51 +00:00
OS_ARCH=`uname -m`
X86_64=`echo "$OS_ARCH" | grep x86_64`
if [ "X$X86_64" = "X" ]; then
wrapperpath="./lib/wrapper/linux"
else
wrapperpath="./lib/wrapper/linux64"
fi
cp $wrapperpath/libwrapper.so ./lib/
cp $wrapperpath/wrapper.jar ./lib/
cp $wrapperpath/i2psvc .
rm -rf ./lib/wrapper
chmod 744 ./i2psvc
2009-02-01 07:51:38 +00:00
echo
echo "Installation finished."
echo
exit