diff options
Diffstat (limited to 'bin/expand-template')
-rwxr-xr-x | bin/expand-template | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/expand-template b/bin/expand-template new file mode 100755 index 0000000000..177f73fd61 --- /dev/null +++ b/bin/expand-template @@ -0,0 +1,16 @@ +#!/bin/sh + +# $Id$ + +SOURCE="$0"; +while [ -h "$SOURCE" ]; do + LOOKUP="`ls -ld "$SOURCE"`"; + TARGET="`expr "$LOOKUP" : '.*-> \(.*\)$'`"; + if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then + SOURCE="${TARGET:-.}"; + else + SOURCE="`dirname "$SOURCE"`/${TARGET:-.}"; + fi; +done; + +scsh -e main -s "$SOURCE.scm" "$@" |