osguess.sh

来自「快速开发」· Shell 代码 · 共 46 行

SH
46
字号
## This script can be used to automatically guess target OS.# It requires the config.guess utility which is a part of GNU Autoconf.# GNU Autoconf can be downloaded from ftp://ftp.gnu.org/gnu/autoconf/## Use "default" as a make target for automatic builds.## Specify path to the config.guess utility (unless set via environment)#CONFIG_GUESS_PATH=if [ x"$CONFIG_GUESS_PATH" = x ]; then  echo "Error: CONFIG_GUESS_PATH variable is not set"  exit 1fiif [ ! -f "$CONFIG_GUESS_PATH/config.guess" ]; then  echo "Can't find $CONFIG_GUESS_PATH/config.guess utility. Wrong path?"  exit 1fisys_info=`/bin/sh $CONFIG_GUESS_PATH/config.guess`echo "Building for $sys_info"case "$sys_info" in  *-ibm-aix4*     ) OS=AIX        ;;  *-freebsd*      ) OS=FREEBSD    ;;  hppa*-hp-hpux11*) OS=HPUX       ;;  *-sgi-irix6*    ) OS=IRIX       ;;  *-linux*        ) OS=LINUX      ;;  *-netbsd*       ) OS=NETBSD     ;;  *-openbsd*      ) OS=OPENBSD    ;;  *-dec-osf*      ) OS=OSF1       ;;  *-solaris2*     ) OS=SOLARIS    ;;  *-darwin*       ) OS=DARWIN     ;;  *               ) OS=                    echo "Sorry, unsupported OS"                    exit 1        ;;esacecho "Making with OS=$OS"

⌨️ 快捷键说明

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