#!/bin/sh # # This script is invoked to create wrapper scripts for AbiSuite # binaries. One should pass it the _base_ name of the program # to wrap (one would pass "AbiWord" to wrap "AbiWord-2.4" and # "AbiWord-2.4"), the install base of the tree and, optionally, the location # of the machine-dependent binaries and scripts, and, optionally, an # installation-only prefix. # Examples: # makewrapper.sh AbiWord /usr/local/AbiSuite /usr/local/libexec/AbiSuite /tmp/package_root # makewrapper.sh AbiCalc /usr/local/AbiSuite /usr/local/libexec/AbiSuite SCRIPT_PATH=$1 PROGRAM_NAME=$2 INSTALL_BASE=$3 LIBEXECDIR=$4 DESTDIR=$5 # Did they supply any arguments? if [ -z "$SCRIPT_PATH" ] then echo "" echo "Error: first argument (script path/name) not specified." echo "" exit 1 fi if [ -z "$PROGRAM_NAME" ] then echo "" echo "Error: second argument (base program name) not specified." echo "" exit 1 fi if [ -z "$INSTALL_BASE" ] then echo "" echo "Error: third argument (installation base directory) not specified." echo "" exit 1 fi if [ -z "$LIBEXECDIR" ] then LIBEXECDIR=${INSTALL_BASE}/bin fi # Make directory path up to program we're creating mkdir -p ${DESTDIR}${LIBEXECDIR} cat >${DESTDIR}$SCRIPT_PATH < if [ `uname` = "SunOS" ] then cat >>${DESTDIR}$SCRIPT_PATH <>${DESTDIR}$SCRIPT_PATH <