亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁(yè) > 學(xué)院 > 操作系統(tǒng) > 正文

CVS RCS HOWTO 原始程式碼版本控制系統(tǒng) (2)

2024-07-26 00:30:59
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
--------------------------------------------------------------------------------

4. Shell Scripts 
下面的 scripts 是基本 CVS 命令的集合,而且是 Korn shell 的 scripts 。你可以把他轉(zhuǎn)成 perl 或者 bash。你可以自己修改成你想要的樣子。這些只是運(yùn)用基本 CVS 命令但有些特殊的花樣加在里面。例如, sedit 這個(gè) script 提供了檔案鎖住的功能使得其他人知道有某人正在修改這個(gè)檔案,當(dāng)然你也可以直接使用 CVS 命令而不用這些 scripts ,這些 scripts 只是在展示 CVS 是多麼的有彈性。 

把這些 scripts 復(fù)制到 /usr/local/bin 下,并且此目錄應(yīng)該在你的 PATH 環(huán)境變數(shù)中。 

sget [-r revision_number]  要從 CVS 獲得一個(gè)唯讀檔案或整個(gè)唯讀目錄,請(qǐng)按 sget 
sedit [-r revision_number]  要修改一個(gè)一個(gè)程式碼時(shí),這個(gè) scripts 會(huì)做檔案鎖住的動(dòng)作,因此沒(méi)有別人可以登出這個(gè)檔案了。當(dāng)然你可以改變這個(gè) script 成你想要的功能 - 例如不鎖住,只出現(xiàn)警告訊息,或者相反的,非常嚴(yán)謹(jǐn)?shù)逆i檔案。請(qǐng)按 sedit 
scommit [-r revision_number]  要交出某個(gè)你修改的檔案或整個(gè)目錄。 把你的改變交給 CVS。請(qǐng)按 scommit 
supdate  要藉由從 CVS 得到最新的檔案來(lái)update 一個(gè)檔案或整個(gè)目錄。請(qǐng)按 supdate 
sunlock [-r revision_number]  要把因?yàn)橛?nbsp;sedit 後的檔案鎖關(guān)掉。這會(huì)釋放檔案鎖(Release File Lock)。請(qǐng)按 sunlock 
slist 要看目前正被你修改的檔案列表。做 'ls -l | grep | ...' 命令,請(qǐng)按 slist 
sinfo  要得到一個(gè)檔案的改版資訊。 請(qǐng)按 sinfo 
slog  要得到一個(gè) CVS 檔案改版的歷史紀(jì)錄,請(qǐng)按 slog 
sdif  
sdif -r rev1 -r rev2  要得到你的檔案與 CVS 柜子里的檔案不同的地方在哪里。請(qǐng)按 sdif 

注意: sdif 只有一個(gè) 'f' ,因?yàn)檫@里已經(jīng)有一個(gè) unix 命令叫 'sdiff'。 


sadd  要新增一個(gè)檔案到 CVS 柜子里。請(qǐng)按 sadd 
sdelete  要從 CVS 柜子里清掉一個(gè)檔案。請(qǐng)按 sdelete 
sfreeze   要凍結(jié)原始碼 (freeze codes) ,這是將要發(fā)行 (release) 整個(gè)原始碼目錄樹。請(qǐng)按 sfreeze 
saddtree   要新增一個(gè)目錄樹到 CVS 。請(qǐng)按 saddtree 
例如 : 


--------------------------------------------------------------------------------

        cd $HOME;   
        sfreeze REVISION_1_0  srctree  


--------------------------------------------------------------------------------
這將會(huì)凍結(jié)原始碼,并貼上一個(gè)標(biāo)簽 REVISION_1_0 ,如此一來(lái)你就可以稍後用版本名字登出整個(gè)目錄樹。 

                ******************************************************



4.1 sget 
注意 : Korn shell /bin/ksh 在你從linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS PRogram sget
# Program to check out the file from CVS read-only

cmdname=`basename $0`

Usage()
{
        print "/nUsage: $cmdname [-r revision_number/symbolic_tag_name]  "
        print "The options -r are optional "
        print "For example - "
        print " $cmdname -r 1.1 foo.cpp"
        print " $cmdname foo.cpp "
        print " $cmdname some_directory "
        print "Extract by symbolic revision tag like - "
        print " $cmdname -r REVISION_1 some_directory "
        print " "
        exit
}

# Command getopt will not supported in next major release. 
# Use getopts instead. 
while getopts r: ii
do
        case $ii in
        r) FLAG1=$ii; OARG1="$OPTARG";;
        ?) Usage; exit 2;;
        esac
done
shift ` expr $OPTIND - 1 `

#echo FLAG1 = $FLAG1 , OARG1 = $OARG1

if [ $# -lt 1 ]; then
        Usage
fi

bkextn=sget_bak

hme=` echo $HOME | cut -f1 -d' '  `
if [ "$hme" = "" ]; then
        print "/nError: /$HOME is not set!!/n"
        exit
fi

# Check if file already exists....
if [ -f $1 ]; then
        user_perms=" "
        group_perms=" "
        other_perms=" "
        user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
        group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
        other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
        if [ "$user_perms" = "w" -o "$group_perms" = "w"  /
                -o "$other_perms" = "w" ]; then
                print "/nError: The file is writable. Aborting $cmdname ......"
                print "       You should either backup, scommit or delete the file and"
                print "       try $cmdname again/n"
                exit
        fi
fi

cur_dir=`pwd`
#echo $cur_dir

len=${#hme}
len=$(($len + 2))
#echo $len

subdir=` echo $cur_dir | cut -b $len-2000 `
#echo $subdir

if [ "$subdir" = "" ]; then
        fdname=$1
else
        fdname=$subdir"/"$1
fi

# Move the file
touch $1 2>/dev/null
/mv -f $1 $1.$bkextn

# Create subshell
(
cd $hme
#echo $fdname

# Use -A option to clear all sticky flags
if [ "$FLAG1" = "" ]; then
        cvs -r checkout -A $fdname
else
        cvs -r checkout -A -$FLAG1 $OARG1 $fdname
fi
)
#pwd

if [ -f $1 ]; then
        print "/nREAD-ONLY copy of the file $fdname obtained."
        print "Done $cmdname"
        #print "/nTip (Usage): $cmdname  /n"
fi


--------------------------------------------------------------------------------

4.2 sedit 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh
# CVS program sedit
# Program to check out the file from CVS read/write mode with locking

cmdname=`basename $0`

Usage()
{
#       print "/nUsage: $cmdname [-r revision_number] [-F] "
#       print "The options -r, -F are optional "
#       print "The option -F is FORCE edit even if file is "
#       print "locked by another developer"

        print "/nUsage: $cmdname [-r revision_number] "
        print "The options -r are optional "

        print "For example - "
        print " $cmdname -r 1.1 foo.cpp"
        print " $cmdname foo.cpp "
#       print " $cmdname -F foo.cpp "
        print " "
}

# Command getopt will not supported in next major release. 
# Use getopts instead. 
#while getopts r:F ii
while getopts r: ii
do
        case $ii in
        r) FLAG1=$ii; OARG1="$OPTARG";;
#       F) FLAG2=$ii; OARG2="$OPTARG";;
        ?) Usage; exit 2;;
        esac
done
shift ` expr $OPTIND - 1 `

#echo FLAG1 = $FLAG1 , OARG1 = $OARG1

if [ $# -lt 1 ]; then
        Usage
        exit
fi

hme=` echo $HOME | cut -f1 -d' '  `
if [ "$hme" = "" ]; then
        print "/nError: /$HOME is not set!!/n"
        exit
fi

bkextn=sedit_bak

cur_dir=`pwd`
#echo $cur_dir

len=${#hme}
len=$(($len + 2))
#echo $len

subdir=` echo $cur_dir | cut -b $len-2000 `
#echo $subdir

if [ "$subdir" = "" ]; then
        fdname=$1
else
        fdname=$subdir"/"$1
fi

# If file is already checked out by another developer....
cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
if [ "$cvs_root" = "" ]; then
        print "/nError: /$CVSROOT is not set!!/n"
        exit
fi
cldir=$CVSROOT/$subdir/Locks
mkdir $cldir 2>/dev/null
rcsfile=$CVSROOT/$subdir/$1,v
#echo $rcsfile

if [ ! -e $rcsfile ]; then
        print "/nError: File $1 does not exist in CVS repository!!/n"
        exit
fi

# Get the tip revision number of the file....
# Use tmpfile as the arg cannot be set inside the sub-shell
tmpfile=$hme/sedit-lock.tmp
/rm -f $tmpfile 2>/dev/null
if [ "$FLAG1" = "" ]; then
        (
        cd $hme
        cvs log $fdname | head -6 | grep head: | awk '{print $2}' > $tmpfile 
        )
        OARG1=`cat $tmpfile`
        /rm -f $tmpfile 2>/dev/null
fi

lockfile=$cldir/$1-$OARG1
#if [ -e $lockfile -a "$FLAG2" = "" ]; then
if [ -e $lockfile ]; then
        print "/nError: File $1 Revision $OARG1 already locked by another developer !!"
        aa=` ls -l $lockfile | awk '{print "Locking developers unix login name is = " $3}' `
        print $aa
        print "That developer should do scommit OR sunlock to release the lock"
        print " "
#       print "You can also use -F option to force edit the file even if"
#       print "the file is locked by another developer. But you must talk to"
#       print "other developer to work concurrently on this file." 
#       print "For example - this option is useful if you work on a seperate"
#       print "C++ function in the file which does not interfere with other"
#       print "developer."
#       print " "
        exit
fi

# Get read-only copy now....
if [ ! -e $1 ]; then
        (
        cd $hme
        cvs -r checkout $fdname 1>/dev/null
        )
fi

# Check if file already exists....
if [ -f $1 ]; then
        user_perms=" "
        group_perms=" "
        other_perms=" "
        user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
        group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
        other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
        if [ "$user_perms" = "w" -o "$group_perms" = "w"  /
                -o "$other_perms" = "w" ]; then
                print "/nError: The file is writable. Aborting $cmdname ......"
                print "       You must backup, scommit or delete file and"
                print "       try $cmdname again/n"
                exit
        fi
        #print "/nNote: The file $1 is read-only."
        #print "Hence I am moving it to $1.$bkextn ..../n"
        /mv -f $1 $1.$bkextn
        chmod 444 $1.$bkextn
elif [ -d $1 ]; then
        print "/nError: $1 is a directory and NOT a file. Aborting $cmdname ..../n"
        exit
fi

# Create subshell
print "/nNow getting the file $1 from CVS repository .../n"
(
cd $hme
#echo $fdname
# Use -A option to clear the sticky tag and to get 
# the HEAD revision version
if [ "$FLAG1" = "" ]; then
        cvs -w checkout -A $fdname
else
        cvs -w checkout -A -$FLAG1 $OARG1 $fdname
fi
)

if [ -e $1 ]; then
        touch $lockfile
fi

#pwd

print "/nDone $cmdname"
#print "/nTip (Usage): $cmdname  /n"


--------------------------------------------------------------------------------

4.3 scommit 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh
# CVS program scommit
# Program to commit the changes and check in the file into CVS

cmdname=`basename $0`

Usage()
{
        print "/nUsage: $cmdname [-r revision_number] "
        print "The options -r are optional "
        print "For example - "
        print " $cmdname -r 1.1 foo.cpp"
        print " $cmdname foo.cpp "
        print " "
}

# Command getopt will not supported in next major release. 
# Use getopts instead. 
while getopts r: ii
do
        case $ii in
        r) FLAG1=$ii; OARG1="$OPTARG";;
        ?) Usage; exit 2;;
        esac
done
shift ` expr $OPTIND - 1 `

#echo FLAG1 = $FLAG1 , OARG1 = $OARG1

if [ $# -lt 1 ]; then
        Usage
        exit 2
fi

if [ -d $1 ]; then
        Usage
        exit 2
fi

hme=` echo $HOME | cut -f1 -d' '  `
if [ "$hme" = "" ]; then
        print "/nError: /$HOME is not set!!/n"
        exit
fi

# Find sub-directory
cur_dir=`pwd`
#echo $cur_dir
len=${#hme}
len=$(($len + 2))
#echo $len
subdir=` echo $cur_dir | cut -b $len-2000 `
#echo $subdir
if [ "$subdir" = "" ]; then
        fdname=$1
else
        fdname=$subdir"/"$1
fi

# If file is already checked out by another user....
cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
if [ "$cvs_root" = "" ]; then
        print "/nError: /$CVSROOT is not set!!/n"
        exit
fi
cldir=$CVSROOT/$subdir/Locks
mkdir $cldir 2>/dev/null

# Get the working revision number of the file....
# Use tmpfile as the arg cannot be set inside the sub-shell
tmpfile=$hme/sedit-lock.tmp
/rm -f $tmpfile 2>/dev/null
if [ "$FLAG1" = "" ]; then
        (
        cd $hme
        cvs status $fdname 2>/dev/null | grep "Working revision:" | awk '{print $3}' >$tmpfile
        )
        OARG1=`cat $tmpfile`
        /rm -f $tmpfile 2>/dev/null
fi

if [ "$OARG1" = "" ]; then
        print "The file $fdname is NEW, it is not in the CVS repository"
else
        lockfile=$cldir/$1-$OARG1
        if [ -e $lockfile ]; then
                # Check if this revision is owned by you...
                aa=` ls -l $lockfile | awk '{print $3}' `
                userid=`id | cut -d'(' -f2 | cut -d')' -f1 `
                if [ "$aa" != "$userid" ]; then
                        print " "
                        print "The file $fdname is NOT locked by you!!"
                        print "It is locked by unix user name $aa and your login name is $userid"
#                       print "If you are working concurrently with other developer"
#                       print "and you used -F option with sedit."
                        print "You need to wait untill other developer does scommit"
                        print "or sunlock"
                        print "Aborting the $cmdname ...."
                        print " "
                        exit 2
                fi
        else
                if [ -f $CVSROOT/$subdir/$1,v ]; then
                        print "You did not lock the file $fdname with sedit!!"
                        print "Aborting the $cmdname ...."
                        exit 2 
                else
                        print "/nThe file $fdname does not exist in CVS repository yet!!"
                        print "You should have done sadd on $fdname ...."
                fi
        fi
fi

if [ -d $1 ]; then
        Usage
        exit 2
        # Do not allow directory commits for now ...
        #cvs commit
else
        cvs commit $1
        exit_status=$?
fi

if [ $exit_status -eq 0 ]; then
        print "/nDone $cmdname. $cmdname successful"
        #print "/nTip (Usage): $cmdname /n"
fi


--------------------------------------------------------------------------------

4.4 supdate 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS program supdate
# Program to update the file from CVS read/write mode

cmdname=`basename $0`

if [ $# -lt 1 ]; then
        print "/nUsage: $cmdname "
        exit
fi

# Check if file already exists....
if [ $# -gt 0 -a  -f $1 ]; then
        user_perms=" "
        group_perms=" "
        other_perms=" "
        user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
        group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
        other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
        if [ "$user_perms" = "w" -o "$group_perms" = "w"  /
                -o "$other_perms" = "w" ]; then
                while :
                do
                        print "/n$cmdname will backup your working file "
                        print "$1 to $1.supdate_bak before doing any merges."
                        print "Are you sure you want the merge the changes from"
                        print -n "CVS repository to your working file ?  [n]: "
                        read ans
                        if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                                if [ -f $1.supdate_bak ]; then
                                        print "/nWarning : File $1.supdate_bak already exists!!"
                                        print "Please examine the file $1.supdate_bak and delete it"
                                        print "and than re-try this $cmdname "
                                        print "Aborting $cmdname ...."
                                        exit
                                else
                                        cp $1 $1.supdate_bak
                                        break
                                fi
                        elif [ "$ans" = "n" -o "$ans" = "N" -o "$ans" = "" -o "$ans" = " " ]; then
                                exit
                        fi
                done
        fi
fi

if [ -d $1 ]; then
        print "/nDirectory update is disabled as cvs update"
        print "merges the changes from repository to your working directory"
        print "So give the filename to update - as shown below: "
        print " Usage: $cmdname "
        exit
#       cvs update
else
        cvs update $1
fi

print "/nDone $cmdname. $cmdname successful"
#print "/nTip (Usage): $cmdname /n"


--------------------------------------------------------------------------------

4.5 sunlock 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx. 



--------------------------------------------------------------------------------

#!/bin/ksh
# CVS program sunlock
# Program to unlock the file to release the lock done by sedit

cmdname=`basename $0`

Usage()
{
        print "/nUsage: $cmdname [-r revision_number] "
        print " The options -r is optional "
        print "For example - "
        print " $cmdname -r 1.1 foo.cpp"
        print " $cmdname foo.cpp "
        print " "
}

# Command getopt will not supported in next major release. 
# Use getopts instead. 
while getopts r: ii
do
        case $ii in
        r) FLAG1=$ii; OARG1="$OPTARG";;
        ?) Usage; exit 2;;
        esac
done
shift ` expr $OPTIND - 1 `

if [ $# -lt 1 ]; then
        Usage
        exit
fi

hme=` echo $HOME | cut -f1 -d' '  `
if [ "$hme" = "" ]; then
        print "/nError: /$HOME is not set!!/n"
        exit
fi

cur_dir=`pwd`
#echo $cur_dir

len=${#hme}
len=$(($len + 2))
#echo $len

subdir=` echo $cur_dir | cut -b $len-2000 `
#echo $subdir

if [ "$subdir" = "" ]; then
        fdname=$1
else
        fdname=$subdir"/"$1
fi

# If file is already checked out by another user....
cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
if [ "$cvs_root" = "" ]; then
        print "/nError: /$CVSROOT is not set!!/n"
        exit
fi
cldir=$CVSROOT/$subdir/Locks
rcsfile=$CVSROOT/$subdir/$1,v
#echo $rcsfile

if [ ! -e $rcsfile ]; then
        print "/nError: File $1 does not exist in CVS repository!!/n"
        exit
fi

# Get the tip revision number of the file....
# Use tmpfile as the arg cannot be set inside the sub-shell
tmpfile=$hme/sedit-lock.tmp
/rm -f $tmpfile 2>/dev/null
if [ "$FLAG1" = "" ]; then
        (
        cd $hme
        cvs log $fdname | head -6 | grep head: | awk '{print $2}' > $tmpfile 
        )
        OARG1=`cat $tmpfile`
        /rm -f $tmpfile 2>/dev/null
fi

lockfile=$cldir/$1-$OARG1
#echo lockfile is : $lockfile
if [ ! -e $lockfile ]; then
        print "/nFile $1 revision $OARG1 is NOT locked by anyone"
        print " "
        exit 
fi

ans=""
while :
do
        print "/n/n***************************************************"
        print "WARNING: $cmdname will release lock and enable other"
        print "         developers to edit the file. It is advisable"
        print "         to save your changes with scommit command"
        print "***************************************************"
        print -n "/nAre you sure you want to unlock the file ? [n]: "
        read ans
        if [ "$ans" = "" -o "$ans" = " " -o "$ans" = "n" -o "$ans" = "N" ]; then
                print "/nAborting $cmdname ...."
                exit
        fi
        if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                print "/n/n/n/n/n "
                print "CAUTION: You may lose all the changes made to file!!"
                print -n "Do you really want to unlock the file ? [n]: "
                read ans
                if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                        break
                else
                        exit
                fi
        else
                print "/n/nWrong entry. Try again..."
                sleep 1
        fi
done

if [ -e $lockfile ]; then
        /rm -f $lockfile
        print "/nDone $cmdname"
else
        print "/nFile $1 is NOT locked by anyone"
        print " "
fi


--------------------------------------------------------------------------------

4.6 slist 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS program slist
# Program to list all edited source files from CVS

#cmdname=`basename $0`

#echo "no of params : " $#
#echo "all args : " $@

recurse_flag=""

if [ "$1" = "" ]; then
        dir=.
        recurse_flag=""
else
        dir=$@
        recurse_flag=" -prune "
fi

FOUT=slist_temporary_file.out

/rm -f $FOUT

find $dir  $recurse_flag -type f -exec ls -ltr {} /; /
| grep -v "/CVS/" /
| grep ^/-rw /
| grep -v //.o /
| grep -v //.log /
| grep -v //.out /
| grep -v //.pid /
| awk '{ if ($NF != "tags") print $0 }' /
| awk '{ if ($NF != "a.out") print $0 }' /
| awk '{ if ($NF != "core") print $0 }' /
| awk '{ print $NF }' > $FOUT

aa=`cat $FOUT`
/rm -f $FOUT

for ii in $aa ; do
        ftype=" "
        ftype=`file $ii | awk '{print $2 }' `

        # find . -type f -exec file {} /;
        # 1)ELF 2)commands 3)[nt]roff, 4)c 5)English  6)executable
        # 7)ascii 8)current 9)empty
        # Binaries are ELF, lib.a are current
        #
        if [ "$ftype" = "ascii" -o "$ftype" = "commands" /
                -o "$ftype" = "[nt]roff," -o "$ftype" = "c" -o "$ftype" = "data" /
                -o "$ftype" = "English" -o "$ftype" = "executable" ]; then
                pcfile=` echo $ii | cut -d'.' -f1`
                pcfile=${pcfile}".pc"
                if [ ! -f $pcfile ]; then
                        ls -l $ii
                else
                        if [ "$ii" = "$pcfile" ]; then
                                ls -l $ii
                        fi
                fi
        fi
done;

#| grep -v ^/-rwx /

#ls -l | grep ^/-rw | grep -v //.o
#ls -l | grep ^/-rw | grep -v //.o | awk '{ if ($NF != "tags") print $0 }'
#ls -l | grep ^/-rw | grep -v ^/-rwx | grep -v //.o |  awk '{ if ($NF != "tags") print $0 }' | awk '{ if ($NF != "core") print $0 }'

#print "/nDone $cmdname. $cmdname successful"
#print "/nTip (Usage): $cmdname /n"


--------------------------------------------------------------------------------

4.7 sinfo 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS program sinfo
# Program to get the status of files in working directory

cmdname=`basename $0`

if [ $# -lt 1 ]; then
        print "/nUsage: $cmdname [file/directory name] "
        print "For example - "
        print " $cmdname foo.cpp"
        print " $cmdname some_directory "
        print " "
        exit
fi

hme=` echo $HOME | cut -f1 -d' '  `
if [ "$hme" = "" ]; then
        print "/nError: /$HOME is not set!!/n"
        exit
fi

tmpfile=$hme/cvs_sinfo.tmp
rm -f $tmpfile

cur_dir=`pwd`
#echo $cur_dir

len=${#hme}
len=$(($len + 2))
#echo $len

subdir=` echo $cur_dir | cut -b $len-2000 `
#echo $subdir

if [ "$subdir" = "" ]; then
        fdname=$1
else
        fdname=$subdir"/"$1
fi

# Create subshell
if [ -f $1 ]; then
        (
        cd $hme
        clear
        cvs status $fdname 
        )
elif [ -d $1 ]; then
        (
        cd $hme
        clear
        echo "  " >> $tmpfile
        echo "  ****************************************" >> $tmpfile
        echo "        Overall Status of Directory" >> $tmpfile
        echo "  ****************************************" >> $tmpfile
        cvs release $fdname 1>>$tmpfile 2>>$tmpfile << EOF
Y
EOF
        echo "/n   -------------------------------/n" >> $tmpfile

        aa=`cat $tmpfile | grep ^"M " | awk '{print $2}' `
        for ii in $aa 
        do
                jj="(cd $hme; cvs status $subdir/$ii );"
                echo $jj | /bin/sh  /
                        | grep -v Sticky | awk '{if (NF != 0) print $0}' /
                        1>>$tmpfile 2>>$tmpfile 
        done

        cat $tmpfile | grep -v ^? | grep -v "Are you sure you want to release" /
        | less
        rm -f $tmpfile
        )
else
        print "/nArgument $1 if not a file or directory"
        exit
fi


--------------------------------------------------------------------------------

4.8 slog 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS program slog
# Program to list history of the file in CVS 

cmdname=`basename $0`

if [ $# -lt 1 ]; then
        print "/nUsage: $cmdname  /n"
        exit
fi

# Check if file does not exist....
if [ ! -f $1 ]; then
        print "/nError: $1 is NOT a file. Aborting $cmdname ......"
        exit
fi

cvs log $1 | /usr/local/bin/less

print "/nDone $cmdname. $cmdname successful"
#print "/nTip (Usage): $cmdname /n"


--------------------------------------------------------------------------------

4.9 sdif 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# CVS program sdif
# Program to see difference of the working file with CVS copy

cmdname=`basename $0`

Usage()
{
        print "/nUsage: $cmdname  "
        print "$cmdname -r -r  /n"
        exit
}
FLAG1=""
FLAG2=""
OARG1=""
OARG2=""
# Command getopt will not supported in next major release. 
# Use getopts instead. 
while getopts r:r: ii
do
        case $ii in
        r) 
                if [ "$FLAG1" = "" ]; then
                        FLAG1=$ii; 
                        OARG1="$OPTARG"
                else
                        FLAG2=$ii; 
                        OARG2="$OPTARG"
                fi
                ;;
        ?) Usage; exit 2;;
        esac
done
shift ` expr $OPTIND - 1 `

if [ "$FLAG2" = "" ]; then
        FLAG2=r
        OARG2=HEAD
fi

if [ "$FLAG1" = "" ]; then
        cvs diff -r HEAD $1 | less
else
        cvs diff -$FLAG1 $OARG1 -$FLAG2 $OARG2 $1 | less
fi


--------------------------------------------------------------------------------

4.10 sadd 
注意 : Korn shell /bin/ksh 在你從Linux CD-ROM 安裝 pdksh*.rpm 時(shí)就會(huì)產(chǎn)生 

請(qǐng)把他存成一般文字檔并改變存取權(quán)限 chmod a+rx 



--------------------------------------------------------------------------------

#!/bin/ksh

# test
# CVS program sadd
# Program to add the file to CVS

cmdname=`basename $0`
if [ $# -lt 1 ]; then
        print "/nUsage: $cmdname  /n"
        exit
fi

# Check if file exists ....
if [ -f $1 ]; then
        cvs add $1
        exit
fi

if [ ! -d $1 ]; then
&n
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
亚洲成人第一| 久久爱com| 成人黄色在线观看视频| 国产一国产二国产三| 国产又黄又猛的视频| 欧美精品乱码久久久久久按摩| 中文字幕免费一区| 娇妻高潮浓精白浆xxⅹ| 男女啪啪免费视频网站| 国产一区二区三区四区五区| 亚洲第一页中文字幕| 欧美在线免费观看| 欧美主播福利视频| 日本亚洲欧美三级| 成人激情动漫在线观看| 欧美精品第一页在线播放| 国内精品小视频| 99热这里只有精品8| 91精品久久久久久| 亚洲免费av一区| 国产精品一区二区av日韩在线| 国产树林野战在线播放| 好吊日视频在线观看| 婷婷精品久久久久久久久久不卡| 日韩毛片一区| 美女久久精品| 特级丰满少妇一级aaaa爱毛片| 精品视频一区二区三区在线观看| 欧美日韩久久一区| 欧美亚洲国产一区二区三区va| 欧美亚洲综合一区| 日本裸体美女视频| 天堂在线中文资源| 日本午夜在线亚洲.国产| 亚洲AV无码国产成人久久| 欧美极品少妇xxxxⅹ免费视频| 麻豆电影传媒二区| 男生和女生一起差差差视频| 亚洲影院免费观看| 免费v片在线观看| 欧美日韩免费看片| 中文字幕字幕中文在线中不卡视频| 91中文字幕永久在线| 精品写真视频在线观看| 亚洲乱码国产乱码精品精大量| 久草免费在线色站| 欧美另类videosbest视频| 国产精品无码电影在线观看| av资源一区二区| 久久久久国内| 黄色网在线看| 精品无码一区二区三区蜜臀| 久久久久久无码精品人妻一区二区| 视频免费在线观看| 麻豆一区二区三区四区精品蜜桃| 欧美黑人又粗又大又爽免费| 亚洲熟妇一区二区| 日本va中文字幕| 日韩在线卡一卡二| 国产调教打屁股xxxx网站| 中文在线资源观看视频网站免费不卡| 无码人妻丰满熟妇奶水区码| 国产精品一区=区| 国产精品一区二区三区精品| 国产精品自拍第一页| 欧美性生交xxxxxdddd| 欧美精品 国产精品| 欧洲黄色一级视频| 懂色av一区二区三区免费观看| 久久男人中文字幕资源站| 成人免费91| 无码任你躁久久久久久老妇| 偷拍25位美女撒尿视频在线观看| 亚洲精品电影网| 中文字幕国产精品久久| 免费亚洲精品视频| 黄色一级免费大片| 亚洲精品国产偷自在线观看| 欧美一级电影久久| 99re资源| 在线免费不卡电影| 写真福利片hd在线观看| 国产精品美女一区二区在线观看| 男人草女人视频| 蜜乳av另类精品一区二区| 国产精品久久久av久久久| 亚洲国产aⅴ成人精品无吗| 91免费观看| 伊人影院综合在线| 精品三区视频| 国产中文一区| 3344国产精品免费看| 人人爽人人爽人人片av| 欧美一级电影在线| 黄色成人小视频| 成人一级生活片| 精品肉丝脚一区二区三区| 真人做人试看60分钟免费| 最近免费中文字幕视频2019| 国产精品二区一区二区aⅴ污介绍| 99久久国产综合精品成人影院| 国产成人av网址| 精品国产123区| 国产乱码精品一区二区三区忘忧草| 天天综合网站| 韩国精品美女www爽爽爽视频| 久久综合一区| 激情久久综合网| 2019年精品视频自拍| 自拍偷拍你懂的| 中文字幕校园春色| 国产欧美综合在线观看第十页| 久久久久久97| 69堂国产成人免费视频| 亚洲一级av无码毛片精品| 久久久久久久久久久久久久久久久| 最新中文字幕一区二区三区| 这里只有精品视频在线| 韩国毛片一区二区三区| 91视频国产高清| 无人区在线高清完整免费版 一区二| www.久久爱.com| 国产精品自拍毛片| 欧美成年人视频在线观看| 久久不射影院| 欧美日韩国产在线观看| 亚洲欧美国产制服动漫| 天堂8中文在线最新版在线| 热久久久久久久久| 三妻四妾的电影电视剧在线观看| 国产精品伊人色| 激情久久免费视频| 中文字幕资源网在线观看| 久久精品国产亚洲av香蕉| 国产成人调教视频在线观看| 日韩精品自拍偷拍| 国产精品尤物| 五月综合激情日本mⅴ| 国产一区二区免费在线| 国内外成人免费激情在线视频网站| av官网在线观看| 欧美a免费在线| 综合色婷婷一区二区亚洲欧美国产| 69日本xxxxxxxxx49| 免费看黄色的视频| 涩涩网站在线看| 精品无码久久久久久久动漫| 日韩视频1区| 91肉色超薄丝袜脚交一区二区| 91在线无精精品白丝| a∨色狠狠一区二区三区| 最新中文字幕av| 99国产超薄丝袜足j在线观看| 小早川怜子痴女在线精品视频| 99久久精品免费| 国产精品视频一区二区图片| 久久激情视频| 亚洲欧美成人| 亚洲欧美日本国产专区一区| 中文字幕在线观看日韩| 擼擼色在线看观看免费| 欧美激情电影| 成人黄色中文字幕| 国产精彩免费视频| 一道本在线视频| 国产精品久久久久久免费播放| 久草视频在线免费| 成人三级视频在线观看| 超碰96在线| 免费短视频成人日韩| 国产精品伦子伦免费视频| 亚欧精品一区| 国产精品网友自拍| 欧美午夜视频| 黄色小网站在线观看| 国产aa视频| 另类中文字幕国产精品| 一区二区三区 日韩| 亚洲天堂国产精品| 日韩欧美123区| 日韩在线观看电影完整版高清免费悬疑悬疑| 日韩黄色影视| 老司机福利在线观看| 欧美在线一二三区| 欧美性猛交p30| 成人三级视频| 国产精品日韩久久久久| 97电影在线| jizzjizzjizzjizz日本老师| 国产在线综合视频| 岛国精品视频在线播放| 福利在线白白| www视频在线观看com| 国内精品麻豆美女在线播放视频| 日本人69视频| 欧美一区二不卡视频| 欧美一级视频在线| 精品在线免费观看视频| 亚洲乱码国产乱码精品天美传媒| 中文字幕精品一区久久久久| 国产波霸爆乳一区二区| 希岛爱理一区二区三区av高清| 国产乱淫片视频| 四虎影院一区二区| 91精品国产自产在线观看永久∴| 影音先锋男人在线资源| 黑巨人与欧美精品一区| 97在线看免费观看视频在线观看| 精品国产免费第一区二区| av成人免费观看| 免费看日产一区二区三区| 91久久精品一区| 成人欧美一区二区三区视频网页| 黄色小视频免费在线观看| 久久久精品免费免费| 欧美激情一级精品国产| 欧美video巨大粗暴18| 综合久久国产九一剧情麻豆| 久久悠悠精品综合网| 国产福利视频在线| 精品香蕉视频| 国产精品免费一区二区| 久久人人爽人人爽人人片av高请| av美女网站| 中文字幕人妻一区二区| 欧美电影免费观看| 97成人精品区在线播放| 粉嫩aⅴ一区二区三区| 久久成人18免费观看| 亚洲自拍欧美色图| 亚洲一区二区免费视频| 国产成人精品999在线观看| 男女啪啪免费体验区| 欧美午夜精品理论片a级按摩| jizzjizzjizzjizz| 中文字幕精品一区二区三区在线| 九一亚洲精品| 欧美日韩中文国产一区发布| 国产成人在线观看免费网站| 国产一级片在线| 国产乱真实合集| 首页国产欧美久久| 国产不卡av在线免费观看| 国产成人亚洲综合91| 妺妺窝人体色WWW精品| 中文字幕亚洲第一| 8×8x拔擦拔擦在线视频网站| 最近中文字幕第一页| 蜜桃色一区二区三区| 亚洲人成电影在线播放| fc2ppv完全颜出在线播放| 国产青草视频在线观看视频| 99久久婷婷国产综合精品首页| 国产激情无套内精对白视频| 国产精品久久一区主播| 亚洲国产精品一区二区www在线| 国产福利在线| 97netav| 欧美午夜精品免费| 国产成人一区二区| 欧美性三三影院| 久久精品aⅴ无码中文字字幕重口| 波多野结衣中文字幕久久| 国产裸体舞一区二区三区| 亚洲国产免费| 亚洲天堂av在线免费| 日韩国产一区三区| 91视频观看免费| 欧美日韩亚洲国内综合网俺| 国产精品福利无圣光在线一区| 亚洲精品97久久中文字幕| 国产三级精品三级| 欧美aa免费在线| 日本在线观看一区二区三区| 国产馆av播放| 你懂的视频在线一区二区| 看黄在线观看| 给我看免费高清在线观看| 精品国产一区一区二区三亚瑟| 国产成人高清在线| k8久久久一区二区三区| 国产精品69毛片高清亚洲| 天天靠夜夜靠| 精品久久久久久久久久久| 香港日本三级视频| 日本黄色网网页| 日本少妇毛茸茸高潮| 国产区一区二区| 久久久久网址| www.66久久| 日本伊人精品一区二区三区观看方式| 国产精品极品| 久久精品99久久| 女人18毛片九区毛片在线| 日本黄色片一级片| 美国黄色一级视频| 18av视频| 久久午夜羞羞影院免费观看| 国产调教在线观看| 久久精品国产福利| 亚洲色成人www永久在线观看| 亚洲不卡中文字幕无码| 亚洲主播在线观看| 黄页大全在线免费观看| 加勒比日本影视| 欧美国产视频一区二区| 91国内外精品自在线播放| 亚州黄色一级| 国产精品美女久久福利网站| av在线天堂播放| 日本一区视频| 国产精品传媒在线观看| jvid福利在线一区二区| 亚洲已满18点击进入在线看片| 欧美热在线视频精品999| 午夜天堂在线观看| 欧美日韩国产色综合一二三四| 国产精品免费在线视频| 最新版天堂资源中文官网| 精品国产一级毛片| 又爽又黄的午夜网站| 亚洲天堂免费在线| 超鹏97在线| 国外男同性恋在线看| 日韩免费视频线观看| 性色av无码久久一区二区三区| 日本中文字幕在线免费观看| 日本私人网站在线观看|