📄 one2one.sh
字号:
#! /bin/sh## $Id: one2one.sh,v 1000.0 2003/10/29 14:25:22 gouriano Exp $# ===========================================================================# # PUBLIC DOMAIN NOTICE# National Center for Biotechnology Information# # This software/database is a "United States Government Work" under the# terms of the United States Copyright Act. It was written as part of# the author's official duties as a United States Government employee and# thus cannot be copyrighted. This software/database is freely available# to the public for use. The National Library of Medicine and the U.S.# Government have not placed any restriction on its use or reproduction.# # Although all reasonable efforts have been taken to ensure the accuracy# and reliability of the software and data, the NLM and the U.S.# Government do not and cannot warrant the performance or results that# may be obtained by using this software or data. The NLM and the U.S.# Government disclaim all warranties, express or implied, including# warranties of performance, merchantability or fitness for any particular# purpose.# # Please cite the author in any work or product based on this material.# # ===========================================================================# # Author: Anton Lavrentiev# # MSVC project file converter. Change configuration in a# single configuration project file.## ===========================================================================usage() { echo 'Automatic single config for Microsoft Visual C++ Project File V 6.0' echo 'Usage:' echo `basename $0` '[--without-dizzy] filename config' exit 1}if [ _$1 = _--without-dizzy ]; then without_dizzy="$1" shiftelse without_dizzy=""fiif [ _$1 = _ -o _$2 = _ ]; then usageelif [ \! -f $1 ]; then echo "ERROR: File \"$1\" must exist. Stop." exit 3fidir=`dirname $0`if [ \! -x ${dir:-.}/all2one.sh ]; then echo "ERROR: Script \"${dir:-.}/all2one.sh\" not found. Stop." exit 3fiif [ \! -x ${dir:-.}/one2all.sh ]; then echo "ERROR: Script \"${dir:-.}/one2all.sh\" not found. Stop." exit 3fifile=/tmp/$$_filecp -f $1 $file${dir:-.}/one2all.sh $without_dizzy $file </dev/null >/tmp/$$_list 2>&1exit=$?if [ `head -1 /tmp/$$_list | grep -c 'ERROR'` != 0 ]; then cat /tmp/$$_list | sed -e "s|$file|$1|g" rm -f /tmp/$$_list $file exit $exitfirm -f $file.bak${dir:-.}/all2one.sh $file $2 </dev/null >/tmp/$$_list 2>&1if [ `tail -1 /tmp/$$_list | grep -c 'ERROR'` != 0 ]; then cat /tmp/$$_list | sed -e "s|$file|$1|g" rm -f /tmp/$$_list $file exit $exitfirm -f $file.bakecho "${1}:" Configured \\"\`tail -1 /tmp/$$_list | sed -e 's|^.* "||' -e 's|" .*\$||'`\\"mv -f $1 $1.bakPATH=$PATH:/usr/sbin:/sbindoser='sed -e s/$/
/'if [ `echo $OSTYPE 2>&1 | grep -c -i cygwin` -ge 1 -o \ `echo $MACHTYPE 2>&1 | grep -c -i cygwin` -ge 1 -o \ `mount 2>&1 | grep -c -i cygwin` -ge 1 ]; then echo >$1 test "`ls -l $1 | tr '\t' ' ' | sed 's/ */ /g' | cut -f5 -d' '`" != "1" && \ doser='sed -n p'fi$doser $file >$1rm -f $file /tmp/$$_listtouch -r $1.bak $1exit 0# # ===========================================================================# PRODUCTION $Log: one2one.sh,v $# PRODUCTION Revision 1000.0 2003/10/29 14:25:22 gouriano# PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.10# PRODUCTION# ===========================================================================#
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -