All pastes #89935 Raw Edit

instsrc

public shellscript v1 · immutable
#89935 ·published 2006-07-17 04:34 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 variable. $CONT meaning contents.CONT=( 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} ] ; then		mv -v {$ARCH} "/tmp"		cd "/tmp"		tar -zf {$ARCH}	fi#compile and install the program	if [ -e "{$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