diff options
author | paltherr <paltherr@epfl.ch> | 2003-02-17 13:39:57 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-02-17 13:39:57 +0000 |
commit | a1f09f8344406301f71dec8578447aec5c68be82 (patch) | |
tree | aabf10aa1fd59a3432fd6c63f930e4d1ffa370a2 /bin/expand-template | |
parent | 5253396420ebd8cfedf0adbc8d12bf9ea2b269bf (diff) | |
download | scala-a1f09f8344406301f71dec8578447aec5c68be82.tar.gz scala-a1f09f8344406301f71dec8578447aec5c68be82.tar.bz2 scala-a1f09f8344406301f71dec8578447aec5c68be82.zip |
- Added expand-template and expand-template.scm
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" "$@" |