mirror of
https://github.com/ParticulateFlow/LPP.git
synced 2025-12-08 06:37:46 +00:00
13
INSTALL.txt
13
INSTALL.txt
@ -1,12 +1,7 @@
|
|||||||
to install *liggghts post processing* (lpp) execute the following
|
to install *liggghts post processing* (lpp) and pizza.py execute
|
||||||
|
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
|
or if you want to specify an install directory other then ~/bin
|
||||||
|
|
||||||
|
./install.sh -p path/to/install/directory
|
||||||
|
|
||||||
to install *pizza.py* copy the following lines of code
|
|
||||||
into your bashrc (please change the variable CFDEM_lppPath according
|
|
||||||
to your system):
|
|
||||||
|
|
||||||
CFDEM_pizzaPath=/Users/s/work/parallelpizza/nightly_build
|
|
||||||
alias pizza ="python -i $CFDEM_pizzaPath/src/pizza.py"
|
|
||||||
|
|||||||
86
install.sh
86
install.sh
@ -1,22 +1,78 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if test "`id -u`" -ne 0
|
PREFIX=$HOME/bin
|
||||||
then
|
|
||||||
echo "ERROR: You need to run this script as root"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "checking for old installations..."
|
USAGE="usage\n\t./install.sh [-p path] [-h]\n\
|
||||||
if [[ -L /usr/bin/lpp ]]; then
|
\t-p\tset install directory\n\
|
||||||
echo "ERROR: you need to uninstall old lpp versions first."
|
\t-h\thelp"
|
||||||
echo "you can do by so executing"
|
|
||||||
echo "sudo rm /usr/bin/lpp /usr/bin/pizza"
|
# get prefix if passed
|
||||||
|
while getopts "p:h" OPTION; do
|
||||||
|
case $OPTION in
|
||||||
|
p )
|
||||||
|
PREFIX=$OPTARG
|
||||||
|
;;
|
||||||
|
h )
|
||||||
|
echo -e $USAGE
|
||||||
|
exit 4
|
||||||
|
;;
|
||||||
|
? )
|
||||||
|
echo -e $USAGE
|
||||||
|
exit 4
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# check prefix
|
||||||
|
if [[ ! -d $PREFIX ]]; then
|
||||||
|
echo "directory '$PREFIX' not found"
|
||||||
|
echo "create directory or choose different install directory using the -p flag"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "setting symbolic links..."
|
|
||||||
ln -s $(pwd)/src/lpp.py /usr/bin/lpp
|
|
||||||
|
|
||||||
echo "checking installation..."
|
# check old installations
|
||||||
echo "which lpp"
|
echo "checking for old installations..."
|
||||||
echo $(which lpp)
|
if hash lpp 2>/dev/null ; then
|
||||||
|
echo "WARNING: lpp is already installed on your system."
|
||||||
|
echo " please remove $(which lpp) before reinstalling."
|
||||||
|
fi
|
||||||
|
if hash pizza 2>/dev/null ; then
|
||||||
|
echo "WARNING: pizza is already installed on your system."
|
||||||
|
echo " please remove $(which pizza) before reinstalling."
|
||||||
|
fi
|
||||||
|
if hash lpp 2>/dev/null ; then
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
|
if hash pizza 2>/dev/null ; then
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# create symlinks
|
||||||
|
echo "creating symlinks..."
|
||||||
|
ln -s $(pwd)/src/lpp.py $PREFIX/lpp
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "cannot create symbolic link for lpp"
|
||||||
|
echo "use a different install directory or try calling this script as root"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s $(pwd)/src/pizza.py $PREFIX/pizza
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "cannot create symbolic link for pizza"
|
||||||
|
echo "use a different install directory or try calling this script as root"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# update path if lpp cannot be found
|
||||||
|
if ! hash lpp 2>/dev/null; then
|
||||||
|
echo "updating path..."
|
||||||
|
echo -e "\n" >> $HOME/.bashrc
|
||||||
|
echo 'export PATH='$PREFIX':$PATH' >> $HOME/.bashrc
|
||||||
|
echo -e "\n" >> $HOME/.bashrc
|
||||||
|
export PATH=$PREFIX:$PATH
|
||||||
|
echo "please execute the command 'bash' to finalize the installation"
|
||||||
|
fi
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
oneline = "writing pp-data in vtk format automatically, saving memory"
|
oneline = "writing pp-data in vtk format automatically, saving memory"
|
||||||
|
|
||||||
docstr = """this is the docstr of LIGGGHTSPostProcessing"""
|
docstr = """this is the docstr of LIGGGHTSPostProcessing"""
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/python -i
|
#!/usr/bin/python -i
|
||||||
|
|
||||||
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html
|
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html
|
||||||
# Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
# Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||||
|
|||||||
Reference in New Issue
Block a user