📄 install
字号:
#! /bin/csh -f# File: Install - shell script to compile install.c# Author: Phil Bunce (pjb@carmel.com)# Revision History:# 970207 Fixed logic that checked for compilers# 970404 Added option to specify compiler name# different 'which' commands generate different output. Here I am# assuming that if it produces a single word of output, it means# that it found one.if ("$1" != "") then set cc = $1 shift goto skip1endifset lst = (cc gcc)set cc = ""foreach i ($lst) set r = `which $i` if ($#r == 1) then set cc = $i break endifendif ("$cc" == "") then echo "Error: Unable to locate a host-targeted (native) C compiler." echo "Note: You can explicitly name the compiler on the command line." exit 1endifskip1:echo "Using $cc. Compiling..."# install.c contains lots of nasty, non ansi code. So tell gcc not to# complain.if ("$cc" == "gcc") set cc = "gcc -traditional"# compile$cc install.c -o installif ($status != 0) exit 1# now run it./install $*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -