diff options
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 +} |