summaryrefslogtreecommitdiffstats
path: root/net/mldonkey-devel/files/wrapper.sh
blob: c25fd62bc13370b04414866ce21fc0a941c863d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

PREFIX="%%PREFIX%%/bin"
PROGRAM="${0}"
DIRNAME=${HOME}/.mldonkey

if [ ! -d ${DIRNAME} ]
then
	mkdir -p ${DIRNAME}
fi

echo " ${*} " | grep " \-createdironly " ||
{
	cd ${DIRNAME} &&
	echo Running under ${DIRNAME} &&
	exec ${PREFIX}/${PROGRAM##*/}-real "${@}" ||
	echo PROBLEM. Cannot create directory ${DIRNAME}, make sure you have the proper permissions to create it and try again
}
OpenPOWER on IntegriCloud