#!/bin/sh usage() { echo "$0 [--prefix install_directory]" exit 1 } INSTALL_DIR="/usr/local" # Parse parameters while [ $# -ge 1 ]; do case $1 in --prefix) INSTALL_DIR=$2 shift ;; *) usage ;; esac shift done mkdir -p $INSTALL_DIR/bin mkdir -p $INSTALL_DIR/share/objj cp -fR objj/* $INSTALL_DIR/share/objj/. BINS=`ls objj/bin` for BIN in $BINS do ln -sf $INSTALL_DIR/share/objj/bin/$BIN $INSTALL_DIR/bin/$BIN chmod +x $INSTALL_DIR/bin/$BIN done chmod +x $INSTALL_DIR/share/objj/bin/* gem install *.gem echo "Cappuccino Tools Installed"