#!/bin/sh
PROGRAM=lazarus
VERSION=`basename $0`
BINARY="/usr/local/share/$VERSION/$PROGRAM"
CONFIG="$HOME/.$VERSION"
if [ ! -x "$BINARY" ]; then
echo "File $BINARY does not exist or is not executable"
exit 1
fi
if [ ! -d "$CONFIG" ]; then
echo "WARNING: configuration directory $CONFIG does not exist"
fi
echo $BINARY --pcp=$CONFIG $@
exec $BINARY --pcp=$CONFIG $@
# Backup content of \$CONFIG here
After all, you're probably already using a shell script to make sure that you don't forget the --pcp option.
The pcp option can be put into the "lazarus.cfg" file. Same directory as the lazarus or startlazarus exe.
- User calls "startlazarus"