⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shlib-install

📁 这个是LINUX下的GDB调度工具的源码
💻
字号:
#! /bin/sh## shlib-install - install a shared library and do any necessary host-specific#		  post-installation configuration (like ldconfig)## usage: shlib-install [-D] -O host_os -d installation-dir -i install-prog [-U] library## Chet Ramey# chet@po.cwru.edu## defaults#INSTALLDIR=/usr/local/libLDCONFIG=ldconfigPROGNAME=`basename $0`USAGE="$PROGNAME [-D] -O host_os -d installation-dir -i install-prog [-U] library"# process optionswhile [ $# -gt 0 ]; do	case "$1" in	-O)	shift; host_os="$1"; shift ;;	-d)	shift; INSTALLDIR="$1"; shift ;;	-i)	shift; INSTALLPROG="$1" ; shift ;;	-D)	echo=echo ; shift ;;	-U)	uninstall=true ; shift ;;	-*)	echo "$USAGE" >&2 ; exit 2;;	*)	break ;;	esacdone# set install target nameLIBNAME="$1"if [ -z "$LIBNAME" ]; then	echo "$USAGE" >&2	exit 2fiOLDSUFF=oldMV=mvRM="rm -f"LN="ln -s"# pre-installif [ -z "$uninstall" ]; then	${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}	if [ -f "$INSTALLDIR/$LIBNAME" ]; then		${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}	fifi# install/uninstallif [ -z "$uninstall" ] ; then	${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}else	${echo} ${RM} ${INSTALLDIR}/${LIBNAME}fi# post-install/uninstall# HP-UX and Darwin/MacOS X require that a shared library have execute permissioncase "$host_os" inhpux*|darwin*|macosx*)	if [ -z "$uninstall" ]; then		chmod 555 ${INSTALLDIR}/${LIBNAME}	fi ;;*)	;;esaccase "$LIBNAME" in*.*.[0-9].[0-9])	# libname.so.M.N	LINK2=`echo $LIBNAME | sed 's:\(.*\..*\.[0-9]\)\.[0-9]:\1:'`	# libname.so.M	LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]\.[0-9]:\1:'`	# libname.so	;;*.*.[0-9])		# libname.so.M	LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]:\1:'`		# libname.so	;;*.[0-9])		# libname.M	LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]:\1:'`		# libname	;;*.[0-9].[0-9].dylib)	# libname.M.N.dylib	LINK2=`echo $LIBNAME | sed 's:\(.*\.[0-9]\)\.[0-9]:\1:'`	# libname.M.dylib	LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'`	# libname.dylibesacINSTALL_LINK1='cd $INSTALLDIR ; ln -s $LIBNAME $LINK1'INSTALL_LINK2='cd $INSTALLDIR ; ln -s $LIBNAME $LINK2'## Create symlinks to the installed library.  This section is incomplete.#case "$host_os" in*linux*|bsdi4*|*gnu*|darwin*|macosx*)	# libname.so.M -> libname.so.M.N	${echo} ${RM} ${INSTALLDIR}/$LINK2	if [ -z "$uninstall" ]; then		${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK2	fi	# libname.so -> libname.so.M.N	${echo} ${RM} ${INSTALLDIR}/$LINK1	if [ -z "$uninstall" ]; then		${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1	fi	;;solaris2*|aix4.[2-9]*|osf*|irix[56]*|sysv[45]*|dgux*)	# libname.so -> libname.so.M	${echo} ${RM} ${INSTALLDIR}/$LINK1	if [ -z "$uninstall" ]; then		${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1	fi	;;# FreeBSD 3.x and above can have either a.out or ELF shared librariesfreebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)	if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then		# libname.so -> libname.so.M		${echo} ${RM} ${INSTALLDIR}/$LINK1		if [ -z "$uninstall" ]; then			${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1		fi	else		# libname.so.M -> libname.so.M.N		${echo} ${RM} ${INSTALLDIR}/$LINK2		if [ -z "$uninstall" ]; then			${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK2		fi		# libname.so -> libname.so.M.N		${echo} ${RM} ${INSTALLDIR}/$LINK1		if [ -z "$uninstall" ]; then			${echo} ln -s $LIBNAME ${INSTALLDIR}/$LINK1		fi	fi	;;hpux1*)	# libname.sl -> libname.M	${echo} ${RM} ${INSTALLDIR}/$LINK1.sl	if [ -z "$uninstall" ]; then#		${echo} ln -s $LIBNAME ${INSTALLDIR}/${LINK1}.sl		${echo} ln -s $LIBNAME ${INSTALLDIR}/${LINK1}	fi	;;*)	;;esacexit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -