개발 환경 구축 과 KScope - ubuntu 10.04 설치


다음 스 크 립 트 를 실행 하면 개발 환경 을 구축 하고 KScope 를 설치 합 니 다.   
 
#!/bin/bash
# Install basic environment for linux C deveropment

# main
# Install basic dev-env.
sudo apt-get install -y build-essential
sudo apt-get install -y bison flex
sudo apt-get install -y manpages-dev

# install NFS server
sudo apt-get install -y nfs-kernel-server portmap

# install minicom
sudo apt-get install -y minicom

# install gvim
sudo apt-get install -y vim-gnome

# install tftp server & client
sudo apt-get install -y tftp-hpa tftpd-hpa

#install kscope
install_kscope() 
{
	echo "Determining machine hardware name... "
	MACHINE=`uname -m`
	case "$MACHINE" in
  		i386 | i586 | i686)
  			ARCH="i386"
  			;;
   		x86_64)
  			ARCH="amd64"
	  		;;
		*)
  			ARCH="i386"
  			;;
	esac

 	# If Kscope is not installed, install it.
	 which kscope &> /dev/null
	if [ $? -ne 0 ]
	then
		#get file
		if [ ! -f kscope_1.6.0-1_${ARCH}.deb ] 
		then
			echo "Downloading kscope..."
			wget http://archive.ubuntu.com/ubuntu/pool/universe/k/kscope/kscope_1.6.0-1_${ARCH}.deb 
		fi

		if [ ! -f kate_3.5.9.dfsg.1-6+lenny1_${ARCH}.deb ] 
		then
			echo "Downloading KDE3 libraries needed by kscope..."
			wget http://ftp.debian.org/debian/pool/main/k/kdebase/kate_3.5.9.dfsg.1-6+lenny1_${ARCH}.deb
		fi
	
   		echo "Installing kscope..."
   		sudo dpkg -i kscope_1.6.0-1_${ARCH}.deb  || 
   		(sudo apt-get install -fy ; sudo apt-get install -fy ) ||
   		echo "some error happens..., plz install it manually" && exit -1
 	fi

 	kscope -v &> /dev/null
 	if [ $? -eq 0 ]
	then
   		echo "Kscope works fine. install done."
   		exit
 	fi

 	echo "Installing KDE3 libraries..."
 	dpkg -x kate_3*.deb kate
 	sudo cp -f kate/usr/lib/libkateinterfaces.so.0.0.0  /usr/local/lib/
 	sudo cp -f kate/usr/lib/libkateutils.so.0.0.0  /usr/local/lib/
 	sudo ln -fs /usr/local/lib/libkateinterfaces.so.0.0.0 /usr/local/lib/libkateinterfaces.so.0
 	sudo ln -fs /usr/local/lib/libkateutils.so.0.0.0 /usr/local/lib/libkateutils.so.0
 	sudo ldconfig

	echo "Finished."
 	rm -rf kate
}

install_kscope





좋은 웹페이지 즐겨찾기