diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-01-22 15:47:28 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-01-22 15:47:28 +0000 |
commit | a24eab08cd055c48e9743c4eb80abfcaef433883 (patch) | |
tree | 7cc770dd6b12a24468e77662662e0dc00df22230 /net-p2p/linux-edonkey-core/files/wrapper.sh | |
parent | Update to 1.0. (diff) |
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
Diffstat (limited to 'net-p2p/linux-edonkey-core/files/wrapper.sh')
-rw-r--r-- | net-p2p/linux-edonkey-core/files/wrapper.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net-p2p/linux-edonkey-core/files/wrapper.sh b/net-p2p/linux-edonkey-core/files/wrapper.sh new file mode 100644 index 000000000000..46fd18de71cd --- /dev/null +++ b/net-p2p/linux-edonkey-core/files/wrapper.sh @@ -0,0 +1,23 @@ +#!/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 +} |