diff options
author | lioux <lioux@FreeBSD.org> | 2003-04-29 12:23:05 +0000 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2003-04-29 12:23:05 +0000 |
commit | 78a91b718859fd5e29c2f50c21d2c843cf82f890 (patch) | |
tree | e925b22764ea8271c497af769a2ab0413d0b5d34 /math/mprime/files | |
parent | 8104e3ec94ae4c400441c791b501b04358bd839e (diff) | |
download | FreeBSD-ports-78a91b718859fd5e29c2f50c21d2c843cf82f890.zip FreeBSD-ports-78a91b718859fd5e29c2f50c21d2c843cf82f890.tar.gz |
New port mprime version 0.0.22.12: mersenne.org distributed Great
Internet Mersenne Prime Search
Diffstat (limited to 'math/mprime/files')
-rw-r--r-- | math/mprime/files/wrapper.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/math/mprime/files/wrapper.sh b/math/mprime/files/wrapper.sh new file mode 100644 index 0000000..3276091 --- /dev/null +++ b/math/mprime/files/wrapper.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PREFIX="%%PREFIX%%" +PROGRAM="${0}" +DIRNAME=${HOME}/.mprime + +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 +} |