Compare commits

..

No commits in common. "master" and "v1.0" have entirely different histories.
master ... v1.0

2 changed files with 6 additions and 16 deletions

View file

@ -9,10 +9,6 @@ For Pizza to work, you need a running mail service (either server, smarthost or
### The simple way
Install Pizza by running "install.sh" from the base-directory.
install.sh takes two arguments: a prefix (the path where to place the executable parts; defaults to "/usr/local/") and
an incprefix (the path where to place the message contents/ASCII-images; defaults to "<prefix>/share").
To set incprefix, passing prefix beforehands is mandatory!
You may also pass the environement variables "$PATH" and "$INCPATH", even though given arguments take precedence.
### The hard way

View file

@ -6,35 +6,29 @@
if [ "$1" ]; then
PREFIX="$1"
PREFIX:="$1"
else
: ${PREFIX:="/usr/local"}
fi
if [ "$2" ]; then
INCPREFIX="$2"
else
: ${INCPREFIX:="${PREFIX}/share"}
fi
# Create necessary directories
for i in "${PREFIX}/bin" "${INCPREFIX}/share/pizza"; do
for i in "${PREFIX}/bin" "${PREFIX}/share/pizza"; do
if [ ! -d "$i" ]; then
mkdir -p "$i"
fi
done
install -m 755 src/pizza "${PREFIX}/bin/pizza"
install -m 644 assets/* "${INCPREFIX}/share/pizza/"
install -m 644 assets/* "${PREFIX}/share/pizza/"
# Tell the user what to do next, if he used another PREFIX
if [ "${INCPREFIX}" != "/usr/local" ]; then
if [ "${PREFIX}" != "/usr/local" ]; then
echo 'Your installation path differs from /usr/local'
echo 'For pizza to run properly, please either modify the script'
echo 'or set the PIZZAINC-variable accordingly.'
echo '(Add the following to your ${shell}rc:'
echo -e "\t export PIZZAINC=\"${INCPREFIX}/pizza/\""
echo -e "\t export PIZZAINC=\"${PREFIX}/share/pizza/\""
echo ")"
fi