summaryrefslogtreecommitdiff
path: root/net-p2p/mldonkey/files/wrapper.sh
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-09-20 16:48:34 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-09-20 16:48:34 +0000
commit6f0132a5273f17515a2357e6a47573bd3418d49d (patch)
treec4cdce89c2b0b20507c649e1c12186d590e32993 /net-p2p/mldonkey/files/wrapper.sh
parentMore updating of master sites. (diff)
New port mldonkey version 1.16: A OCAML/GTK client for the eDonkey
peer-to-peer network Submitted by: Holger Lamm <holger@e-gitt.net>
Notes
Notes: svn path=/head/; revision=66860
Diffstat (limited to 'net-p2p/mldonkey/files/wrapper.sh')
-rw-r--r--net-p2p/mldonkey/files/wrapper.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/net-p2p/mldonkey/files/wrapper.sh b/net-p2p/mldonkey/files/wrapper.sh
new file mode 100644
index 000000000000..c25fd62bc133
--- /dev/null
+++ b/net-p2p/mldonkey/files/wrapper.sh
@@ -0,0 +1,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
+}