my tar.gz installer..
#!/bin/bash
# a source version program installer
# keep you away from looking at dumb outputs until previous install command finishes..
# by Eugene Kim
# Installation
# save this file as autoinstall.sh in your $PATH
# #chmod +x autoinstall.sh
#Usage
# if u have to
# ./configure
# make
# make install
# in order to install a program
# #autoinstall.sh
# and type ./configure, make, make install at the prompt
# autoinstall will do ./configure, make, make install in order
cd `pwd`
store()
{
result=$result'::'$arg
}
while [[ -z $arg || $arg != 0 ]]
do
echo "Enter command to be executed (if u entered all commands, type 0):"
read arg
store
done
result=`echo $result | sed 's/:://'`
echo $result |
gawk 'BEGIN { RS="::"}
{
if($0 !~ /0/) {
printf( "executing %s\n", $0)
if(system($0) != 0) {
printf( "%s caused error\n", $0)
exit}
}
}'
Last edited by doublefailure; 07-13-2002 at 03:49 PM.
|