I am using GNU bash, version 3.2.51(1)-release (sparc-sun-solaris2.10) on Solaris and trying to write a bash script to configure/compile sudo after doing a few other items. Essentially I want to be able to have operators run this script so they can install sudo from source by just running this script and not having to worry about running ./configure with options and make, etc..
It appears it works up until the config.status libtool part and then it dies with:
: creating pathnames.h config.status: pathnames.h is unchanged config.status: executing libtool commands
./install_sudo.sh: line 55: configure:: command not found
install_sudo.sh is my script which basically just untar's sudo and sets up the path. It then runs a function ConfigureSudo:
here is the script now that is not working with the above error:
#!/usr/bin/bash
Unpack(){
SRCA="sudo-1.8.7.tar.gz"
SRCB="sudo-1.8.7.tar"
if [ -f $PWD/$SRCA ]; then
echo "sudo source appears to be here!"
`/usr/bin/gunzip "$SRCA"`
`/usr/bin/tar xf "$SRCB"`
else
echo "Check your source file."
fi
}
SetupPath(){
echo "Setting up path to use included Solaris software..."
echo "Current PATH is $PATH"
PATH=/usr/sfw/bin:/usr/sfw/sbin:/usr/sfw/sparc-sun-solaris2.10/bin:$PATH
echo "Now set to $PATH"
}
ConfigureSudo(){
dir="/tmp/sudo-1.8.7"
arg1="--prefix=/usr/local"
arg2="--sysconfdir=/etc"
arg3="--localstatedir=/var/run/sudo"
arg4="--with-pam"
arg5="--with-timedir=/var/lib/sudo"
cmd=configure
$($dir/$cmd $arg1 $arg2 $arg3 $arg4 $arg5)
}
Unpack
SetupPath
ConfigureSudo
Any help to get past with is greatly appreciated. TIA! Jeff