All pastes #89231 Raw Edit

Unnamed

public shellscript v1 · immutable
#89231 ·published 2006-07-16 00:17 UTC
rendered paste body
#!/bin/bash#this script was designed for use with checkinstall (http://asic-linux.com.mx/~izto/checkinstall/)#if you don't use checkinstall try running "sed /s/"sh checkinstall"/"sh make install"/g instsrc" or just get checkinstall.ARCH="$1"#add the name of the contents to a variableCONT=( tar -tf {$ARCH} )if [ $1 = --help ] ; then	echo 'instsrc will compile, make and then install source code with checkinstall.'	echo 'just use the name of a .tar.gz or .tar.bz2 source code archive as an argument.'	exitelse#unpack the archive	if [ -f {$ARCH} ] ; the		mv -v {$ARCH} "/tmp"		cd "/tmp"		tar -zf {$ARCH}	fi#compile and install the program	if [ -d {$CONT} ] ; then		cd {$CONT}		if [ -x "configure" ] ; then			"su"			"./configure"			"sh make"			"sh checkinstall"			"sh installpkg {$CONT}.tgz"			exit		else			echo 'There is no configure file, this may not be a typical source code archive.'			echo 'Try checking for a "readme","install" or other documentation in the archive'			exit		fi	else		echo 'This may not be a typical source code archive.'		echo 'Try checking for a "readme","install" or other documentation in the archive'		exit	fiexitfi