From 78a91b718859fd5e29c2f50c21d2c843cf82f890 Mon Sep 17 00:00:00 2001 From: lioux Date: Tue, 29 Apr 2003 12:23:05 +0000 Subject: New port mprime version 0.0.22.12: mersenne.org distributed Great Internet Mersenne Prime Search --- math/mprime/files/wrapper.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 math/mprime/files/wrapper.sh (limited to 'math/mprime/files') 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 +} -- cgit v1.1