summaryrefslogtreecommitdiffstats
path: root/math/mprime/files
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2003-04-29 12:23:05 +0000
committerlioux <lioux@FreeBSD.org>2003-04-29 12:23:05 +0000
commit78a91b718859fd5e29c2f50c21d2c843cf82f890 (patch)
treee925b22764ea8271c497af769a2ab0413d0b5d34 /math/mprime/files
parent8104e3ec94ae4c400441c791b501b04358bd839e (diff)
downloadFreeBSD-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.sh23
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
+}
OpenPOWER on IntegriCloud