Skip to content
Permalink
Browse files

Add biomake-swipl7

  • Loading branch information
Samuel Neaves
Samuel Neaves committed Nov 9, 2019
1 parent 4d170e9 commit e1aa0640db72fff713854cb47673e7fe0b96eccd
Showing with 24 additions and 0 deletions.
  1. +24 −0 bin/biomake-swipl7
@@ -0,0 +1,24 @@
#!/bin/bash

# Symlink resolution: http://stackoverflow.com/a/697552/726581

# get the absolute path of the executable
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")

# resolve symlinks
while [[ -h $SELF_PATH ]]; do
# 1) cd to directory of the symlink
# 2) cd to the directory of where the symlink points
# 3) get the pwd
# 4) append the basename
DIR=$(dirname -- "$SELF_PATH")
SYM=$(readlink "$SELF_PATH")
SELF_PATH=$(cd "$DIR" && cd "$(dirname -- "$SYM")" && pwd)/$(basename -- "$SYM")
done

PATH_TO_ME=`dirname $SELF_PATH`;
if [ -z "$BIOMAKE_PATH" ]; then
BIOMAKE_PATH=$PATH_TO_ME/../prolog;
fi

$PATH_TO_ME/swipl_wrap -L0 -G0 -T0 -q -p library=$BIOMAKE_PATH -g 'assert(biomake_prog("'$0'")),main,halt' -t halt -s $BIOMAKE_PATH/biomake/cli -- "$@"

0 comments on commit e1aa064

Please sign in to comment.
You can’t perform that action at this time.