freebsd-ports/net-p2p/linux-edonkey-core/files/wrapper.sh
Mario Sergio Fujikawa Ferreira a24eab08cd o New port edonkey-core version 0.2000.15.16.58.0.2: eDonkey2000
'core' command line client
o README.FreeBSD worked with pat

Reviewed by:	pat
2002-01-22 15:47:28 +00:00

23 lines
500 B
Bash

#!/bin/sh
PREFIX="%%PREFIX%%"
PROGRAM="${0}"
DIRNAME=${HOME}/.edonkey2000-core
if [ ! -d ${DIRNAME} ]
then
mkdir -p ${DIRNAME}
fi
if [ ! -h ${DIRNAME}/${PROGRAM##*/} ]
then
ln -sf ${PREFIX}/bin/${PROGRAM##*/}-real ${DIRNAME}/${PROGRAM##*/}
fi
echo " ${*} " | grep " \-createdironly " ||
{
cd ${DIRNAME} &&
echo Running under ${DIRNAME} &&
exec ./${PROGRAM##*/} ${*} ||
echo PROBLEM. Cannot create directory ${DIRNAME}, make sure you have the proper permissions to create it and try again
}