Skip to content

Instantly share code, notes, and snippets.

@mdondrup
Created December 2, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdondrup/de12d248b6cde372760d3ba17b30b82b to your computer and use it in GitHub Desktop.
Save mdondrup/de12d248b6cde372760d3ba17b30b82b to your computer and use it in GitHub Desktop.
CURDIR=`pwd`
LOGFILE=$CURDIR/macsysfinder-install.log # give the logfile a proper name
# if [ -e $LOGFILE ]; then rm $LOGFILE ; fi # no need to delete the file each time
mkdir -p bin
mkdir -p src
#install vmatch
echo " downloading and compiling of Vmatch" >> $LOGFILE
echo "change directory to $CURDIR/src" >> $LOGFILE
cd src
wget http://vmatch.de/distributions/vmatch-2.3.0-${distribution}-64bit.tar.gz >> $LOGFILE
tar -zxf vmatch-2.3.0-${distribution}-64bit.tar.gz >> $LOGFILE
gcc -Wall -Werror -fPIC -O3 -shared vmatch-2.3.0-${distribution}-64bit/SELECT/sel392.c -o $CURDIR/sel392v2.so >> $LOGFILE
echo "copy $CURDIR/src/vmatch-2.3.0-${distribution}-64bit/vmatch, mkvtree and vsubseqselect to $CURDIR/bin/" >> $LOGFILE
cp $CURDIR/src/vmatch-2.3.0-${distribution}-64bit/vmatch $CURDIR/bin/vmatch2 ## no need to sudo, the dir already belonged to us
cp $CURDIR/src/vmatch-2.3.0-${distribution}-64bit/mkvtree $CURDIR/bin/mkvtree2
cp $CURDIR/src/vmatch-2.3.0-${distribution}-64bit/vsubseqselect $CURDIR/bin/vsubseqselect2
echo "change directory to $CURDIR" >> $LOGFILE
cd $CURDIR
#install macsyfinder
echo "Installation of MacSyFinder" >> $LOGFILE
# cd ${CURDIR}
wget https://dl.bintray.com/gem-pasteur/MacSyFinder/macsyfinder-1.0.5.tar.gz >> $LOGFILE
tar -xzf macsyfinder-1.0.5.tar.gz
# test -d bin || mkdir bin
# cd bin
ln -s macsyfinder-1.0.5/bin/macsyfinder bin/macsyfinder
cd ${CURDIR}
echo "add definition of MACSY_HOME (${CURDIR}/macsyfinder-1.0.5/) in .profile" >> $LOGFILE
echo "export MACSY_HOME=${CURDIR}/macsyfinder-1.0.5/" >> $HOME/.profile
echo "add bin folder ($CURDIR/bin) to the definition of PATH in $HOME/.profile" >> $LOGFILE
echo "export PATH=${CURDIR}/bin:${PATH}" >> $HOME/.profile
#set environment variables
source $HOME/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment