📄 configure.sh
字号:
#!/bin/sh# --------------------------------------------------------------------# --------------------------------------------------------------------if [ -f ".configured" ]then echo "" echo "You have already run 'configure.sh'" echo "running it again will overwrite 'Makefile' and 'Makefile.config'" echo "Are you sure you wish to continue [Y/N]?" read answer case "$answer" in Y*|y*) ;; *) exit 0 ;; esacfi# --------------------------------------------------------------------UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknownUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown # --------------------------------------------------------------------case $UNAME_SYSTEM in SunOS*) case $UNAME_RELEASE in 5.4) EXTENSION=solaris-2.4 ;; 5.5.1) EXTENSION=solaris-2.5.1 ;; 5.6) EXTENSION=solaris-2.6 ;; *) EXTENSION= ;; esac ;; Linux*) EXTENSION=linux ;; UnixWare*) EXTENSION=unixware ;; HP-UX*) EXTENSION= ;; OSF1*) EXTENSION= ;; unknown) ( hostinfo | grep NeXT ) 2>/dev/null >/dev/null if [ $? -eq 0 ] then EXTENSION=next else EXTENSION= fi ;; *) EXTENSION= ;;esacif [ "X-${EXTENSION}" = "X-" ]then echo "" echo "I Dont know how to build for '${UNAME_SYSTEM}'" echo "Copy a 'Makefile.config.OSTYPE' from the config directory" echo "which most closely resembles your platform into this" echo "directory and rename it 'Makefile.config'" echo "" echo "You may wish to edit Makefile.config for site specific dependencies" echo "When you have finished, to build and install sms_client run:" echo "" echo " make ; make install" echo "" exit 1fi# --------------------------------------------------------------------cp config/Makefile.config.${EXTENSION} Makefile.configif [ $? -ne 0 ]then echo "'cp config/Makefile.config.${EXTENSION} Makefile.config' failed" exit 1ficp config/Makefile Makefileif [ $? -ne 0 ]then echo "'cp config/Makefile Makefile' failed" exit 1fitouch .configuredif [ $? -ne 0 ]then echo "'touch .configured' failed" exit 1fiecho ""echo "Copying 'config/Makefile.config.${EXTENSION}' to 'Makefile.config'"echo "Configuration complete"echo "You may wish to edit Makefile.config for site specific dependencies"echo "When you have finished, to build and install sms_client run:"echo ""echo " make ; make install"echo ""exit 0# --------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -