#!/bin/sh # # Create a runnable file of auxiliary tools, such as gauche-install. # # Auxiliary scripts are written in Gauche, and on Unix systems it is # suffice to use shebang magic to execute them. However, on Windows, # shebang doesn't work, and we don't want to rely on .bat files # (its command-line processing is totaly broken). So we create # executables. Windows also requires resource info if the command # takes certain actions. usage() { echo "Usage: make-tool.sh ..." exit 1 } do_posix() { bindir=$1 target=$2 source=$3 rm -f $target echo "#!${bindir}/gosh" > $target && cat $source >> $target chmod -w+x $target } scm2c() { source=$1 target=$2 rm -f $target cat > $target < $target cat >> $target <