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

📄 cvscheck

📁 MSYS在windows下模拟了一个类unix的终端
💻
字号:
#! /bin/sh## cvscheck - identify files added, changed, or removed #            in CVS working directory## Contributed by Lowell Skoog <fluke!lowell@uunet.uu.net># # This program should be run in a working directory that has been# checked out using CVS.  It identifies files that have been added,# changed, or removed in the working directory, but not "cvs# committed".  It also determines whether the files have been "cvs# added" or "cvs removed".  For directories, it is only practical to# determine whether they have been added.name=cvscheckchanges=0# If we can't run CVS commands in this directorycvs status . > /dev/null 2>&1if [ $? != 0 ] ; then    # Bail out    echo "$name: there is no version here; bailing out" 1>&2    exit 1fi# Identify files added to working directoryfor file in .* * ; do    # Skip '.' and '..'    if [ $file = '.' -o $file = '..' ] ; then	continue    fi    # If a regular file    if [ -f $file ] ; then	if cvs status $file | grep -s '^From:[ 	]*New file' ; then	    echo "file added:      $file - not CVS committed"	    changes=`expr $changes + 1`	elif cvs status $file | grep -s '^From:[ 	]*no entry for' ; then	    echo "file added:      $file - not CVS added, not CVS committed"	    changes=`expr $changes + 1`	fi    # Else if a directory    elif [ -d $file -a $file != CVS.adm ] ; then	# Move into it	cd $file	# If CVS commands don't work inside	cvs status . > /dev/null 2>&1	if [ $? != 0 ] ; then	    echo "directory added: $file - not CVS added"	    changes=`expr $changes + 1`	fi	# Move back up	cd ..    fidone# Identify changed fileschangedfiles=`cvs diff | egrep '^diff' | awk '{print $3}'`for file in $changedfiles ; do    echo "file changed:    $file - not CVS committed"    changes=`expr $changes + 1`done# Identify files removed from working directoryremovedfiles=`cvs status | egrep '^File:[ 	]*no file' | awk '{print $4}'`# Determine whether each file has been cvs removedfor file in $removedfiles ; do    if cvs status $file | grep -s '^From:[ 	]*-' ; then	echo "file removed:    $file - not CVS committed"    else	echo "file removed:    $file - not CVS removed, not CVS committed"    fi    changes=`expr $changes + 1`doneexit $changes

⌨️ 快捷键说明

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