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

📄 bsdinst.sh

📁 unix vnc 协议源码. VNC是一款远程控制工具软件.
💻 SH
字号:
#!/bin/sh# $XFree86: xc/config/util/bsdinst.sh,v 3.3 1996/12/23 05:56:13 dawes Exp $## This accepts bsd-style install arguments and makes the appropriate calls# to the System V install.# $XConsortium: bsdinst.sh /main/8 1996/09/28 16:16:11 rws $flags=""dst=""src=""dostrip=""owner=""group=""mode=""bargs=$*while [ x$1 != x ]; do    case $1 in 	-c) shift	    continue;;	-m) flags="$flags $1 $2 "	    mode="$2"	    shift	    shift	    continue;;	-o) flags="$flags -u $2 "	    owner="$2"	    shift	    shift	    continue;;	-g) flags="$flags $1 $2 "	    group="$2"	    shift	    shift	    continue;;	-s) dostrip="strip"	    shift	    continue;;	*)  if [ x$src = x ] 	    then		src=$1	    else		dst=$1	    fi	    shift	    continue;;    esacdoneif [ x$src = x ] then	echo "$0:  no input file specified"	exit 1fiif [ x$dst = x ] then	echo "$0:  no destination specified"	exit 1fiif [ -x /usr/ucb/install ]then	if [ -d "$dst" ]	then		dst=$dst/`basename "$src"`	fi	case "$group" in	"")		bargs="-g other $bargs"		;;	esac	/usr/ucb/install $bargs	if [ x$dostrip = xstrip -a -x /usr/bin/mcs ]	then		/usr/bin/mcs -d $dst	fi	exit 0fi	case "$mode" in"")	;;*)	case "$owner" in	"")		flags="$flags -u root"		;;	esac	;;esac# set up some variable to be used laterrmcmd=""srcdir="."# if the destination isn't a directory we'll need to copy it firstif [ ! -d $dst ]then	dstbase=`basename $dst`	cp $src /tmp/$dstbase	rmcmd="rm -f /tmp/$dstbase"	src=$dstbase	srcdir=/tmp	dst="`echo $dst | sed 's,^\(.*\)/.*$,\1,'`"	if [ x$dst = x ]	then		dst="."	fifi# If the src file has a directory, copy it to /tmp to make install happysrcbase=`basename $src`if [ "$src" != "$srcbase" ] && [ "$src" != "./$srcbase" ] then	cp $src /tmp/$srcbase	src=$srcbase	srcdir=/tmp	rmcmd="rm -f /tmp/$srcbase"fi# do the actual installif [ -f /usr/sbin/install ]then	installcmd=/usr/sbin/installelif [ -f /etc/install ]then	installcmd=/etc/installelse	installcmd=installfi# This rm is commented out because some people want to be able to# install through symbolic links.  Uncomment it if it offends you.# rm -f $dst/$srcbase(cd $srcdir ; $installcmd -f $dst $flags $src)if [ x$dostrip = xstrip ]then	strip $dst/$srcbase	if [ -x /usr/bin/mcs ]	then		/usr/bin/mcs -d $dst/$srcbase	fifiif [ x$mode != x ]then	chmod $mode $dst/$srcbasefi# and clean up$rmcmd

⌨️ 快捷键说明

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