From 8a1254ce34517050a9570180b3b4e43326475e20 Mon Sep 17 00:00:00 2001 From: alavoor <> Date: Tue, 25 Jun 2002 18:13:45 +0000 Subject: [PATCH] aldev updates --- LDP/howto/linuxdoc/CVS-RCS-HOWTO.sgml | 2602 +---------------- LDP/howto/linuxdoc/Modem-Dialup-NT-HOWTO.sgml | 208 +- 2 files changed, 177 insertions(+), 2633 deletions(-) diff --git a/LDP/howto/linuxdoc/CVS-RCS-HOWTO.sgml b/LDP/howto/linuxdoc/CVS-RCS-HOWTO.sgml index 8880d766..38fb6070 100644 --- a/LDP/howto/linuxdoc/CVS-RCS-HOWTO.sgml +++ b/LDP/howto/linuxdoc/CVS-RCS-HOWTO.sgml @@ -44,14 +44,14 @@ Revision Control System Al Dev (Alavoor Vasudevan) -v22.5, 2002-05-29 +v22.6, 2002-06-22 This document is a "practical guide" to very quickly setup CVS/RCS source code control system. This document has custom shell scripts that are wrappers on top of CVS. These scripts provide an easy user interface for CVS. Several shell scripts are provided to make RCS easier to use. The information in this document applies to Linux and as well as to all other -flavors of Unix liks Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, Apple +flavors of Unix like Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, Apple Macintosh (which is BSD unix) etc.. and BeOS. @@ -60,16 +60,10 @@ Macintosh (which is BSD unix) etc.. and BeOS. - Introduction

@@ -91,7 +85,7 @@ underneath and has an application layer interface as a wrapper on top of RCS. CVS can record the history of your files (usually, but not always, source code). CVS only stores the differences between versions, instead of every version of every file -you've ever created. CVS also keeps a log of who, when and +you've created. CVS also keeps a log of who, when and why changes occurred, among other aspects. CVS is very helpful for managing releases and controlling @@ -112,8 +106,8 @@ CVS is a very highly sophisticated and complex system. It is the "State of the Art" technology and is so called "software miracle". The CVS software is a very advanced and capable system developed -over a very long period of time. And it took several years to mature!!. It tooks -about 20 to 30 years of research to develop CVS algorithms and later coding it +over a very long period of time. And it took several years to mature!! It took +about 20 to 30 years of research to develop CVS algorithms and later it was coded into a software. And even today, it is still evolving!! CVS algorithms actually started in Universities several decades ago and @@ -127,16 +121,9 @@ later helped Brian with the design of the CVS module and vendor branch support. And today each and every major software development project in the world is written using CVS as the safe repository. As good old software hats say - "You are in very safe hands, if you are using CVS !!!" - Which One Is for Me? CVS or RCS

CVS actually uses RCS underneath. CVS is a lot more powerful tool and @@ -146,8 +133,8 @@ See the sample korn shell scripts at . Advantages of CVS: - CVS is decentralised so a user checks out files/directories -from the repostitory + CVS is decentralized so a user checks out files/directories +from the repository and have his own separate stable source directory tree. CVS can "STAMP" releases of an entire project source tree. CVS can enable concurrent editing of files. @@ -162,7 +149,7 @@ Disadvantages of CVS: Needs a little more administration than RCS. Very highly sophisticated and complex system. It is "State of the Art" technology. The cvs software is a very advanced and capable system developed -over a very long period of time (it took several years!!). It tooks about 20 to 30 years +over a very long period of time (it took several years!!). It took about 20 to 30 years of research to develop CVS and it is still evolving!! Has a large number of commands and command options, hence a steeper learning curve for beginners. The shell scripts at can ease usage. @@ -200,16 +187,9 @@ or visit See also the RCS shell scripts at - Setting up CVS

First you need to install the CVS package. On Redhat Linux use: @@ -224,21 +204,15 @@ rpm -qpl cvs*.rpm | less and browse the output using j,k, CTRL+f, CTRL+D, CTRL+B, CTRL+U or using arrow keys, page up/down keys. See 'man less'. -The Openssh is required if you want to use ssh (Secure Shell) wich CVS. +The Openssh is required if you want to use ssh (Secure Shell) with CVS. On other flavors of Unix, you may need to download the RCS and CVS tar balls and follow the README, INSTALL files to setup CVS. Visit and - Environment variables

The following environment variables need to be setup in /etc/profile - default @@ -282,11 +256,12 @@ bash# chgrp -R cvs $CVSROOT bash# chmod o-rwx $CVSROOT bash# chmod ug+rwx $CVSROOT -#To initialize the CVS repository and to put in source code files do: +# To initialize the CVS repository and to put in source code files +# do (but requires env CVSROOT to be set) : bash# cvs init # Add the unix users to the cvs group. Create supplementary groups for users. -# Note that you MUST not put any blank spaces after comma seperating the +# Note that you MUST not put any blank spaces after comma separating the # group names in -G option. # In example below user tom belongs to groups cvs, users and staff and user # johnson belongs to group cvs only. @@ -307,21 +282,21 @@ bash$ export CVSROOT=/home/cvsroot # the default behavior is to permit modification of your working files. bash$ export CVSREAD=yes -# Change directory is a must +# Change directory is a must (MANDATORY) bash$ cd $HOME/somedir/anotherdir/directory/my_source_code_dir # Must give vendor tag and revision tag -cvs import somedir/anotherdir/directory/my_source_code_dir Vendor1_0 Rev1_0 +cvs import somedir/anotherdir/directory/my_source_code_dir vendor_1_0 rev_1_0 # Also note that it is very important to give the directory tree starting # from the $HOME, that is, in above example starting from somedir. # For example I did: bash$ cd $HOME/howto/foobar -bash$ cvs import howto/foobar Vendor1_0 Rev1_0 +bash$ cvs import howto/foobar vendor_1_0 rev_1_0 # Another example is: bash$ cd $HOME/javafilesdir -bash$ cvs import javafilesdir Vendor1_0 Rev1_0 +bash$ cvs import javafilesdir vendor_1_0 rev_1_0 # A sample testing and verification: bash$ cd $HOME/howto/foobar @@ -334,14 +309,10 @@ is a common mistake not to change directory while doing cvs import. You source-code-directory and then do cvs import. For example: bash$ cd $HOME/somedirectory/foobardir -bash$ cvs import somedirectory/foobardir Vendor1_0 Rev1_0 +bash$ cvs import somedirectory/foobardir vendor_1_0 rev_1_0 - + Setup CVS on Client Box

On client boxes where you want to use the CVS, you should install @@ -359,92 +330,21 @@ bash$ export CVSROOT=:pserver:username@cvs.tldp.org:/cvsroot bash$ export CVS_RSH="ssh" See also . - Migrate RCS to CVS

-To migrate the existing RCS files to CVS, use the following script. Make sure -that you installed the Korn shell package pdksh*.rpm from the Linux contrib cdrom. +To migrate the existing RCS files to CVS, use the following script from + +. Make sure that you installed the Korn shell package pdksh*.rpm from the Linux contrib cdrom. NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from the Linux contrib cdrom - -#!/bin/ksh -############################################################# -# Program to Migrate the existing source code in RCS to CVS -# -# Needs the korn shell RPM package pdksh*.rpm from Linux -# contrib cdrom -############################################################# - -# -# rcs2cvs - convert source tree from RCS to CVS -# - -# project to convert -PROJECT='project' - -# current RCS root -RCSROOT="$HOME/rcs" - -if cd "$RCSROOT/$PROJECT" -then - cd "$RCSROOT" -else - echo >&2 "`basename "$0"`: can't change to RCS directory '$RCSROOT/$PROJECT'." - exit 1 -fi - -# current CVS root -CVSROOT="$HOME/cvsroot" - -# create new CVS directory for project 'project' -if mkdir "$CVSROOT/$PROJECT" -then - : -else - echo >&2 "`basename "$0"`: can't create CVS directory '$CVSROOT/$PROJECT'." - exit 2 -fi - -# create CVS project tree from RCS tree -find "$PROJECT" -type d -name RCS -print | -while read RCS -do - CVS="`dirname "$RCS"`" - (if cd "$RCS" - then -# if find . -type f -name '*,v' -print | cpio -pdmv "$CVSROOT/$CVS" - if find . -type f -print | cpio -pdmv "$CVSROOT/$CVS" - then - : - else - echo >&2 "`basename "$0"`: can't convert RCS subdirectory '$RCSROOT/$RCS' to CVS subdirectory '$CVSROOT/$CVS'." - fi - else - echo >&2 "`basename "$0"`: can't change to RCS subdirectory '$RCSROOT/$RCS'." - fi) -done - Now the RCS is migrated to CVS as 'project'. You can start using the CVS commands on module 'project'. - Intro to CVS Commands

CVS provides a rich variety of commands (cvs_command in @@ -461,11 +361,9 @@ The most commonly used CVS commands are: remove, commit and diff. - + + + checkout

cvs checkout modules... @@ -499,11 +397,9 @@ Usage: (Specify the --help global option for a list of other help options)

- + + + Staying in sync with other developers - 'cvs update'

cvs update @@ -536,11 +432,9 @@ bash$ cvs update If another developer has done bigger changes such as adding new directories etc. do: bash$ cvs update -d - + + + add

cvs add file... @@ -576,11 +470,8 @@ bash$ rm existingFile bash$ cvs remove existingFile bash$ cvs commit - + + remove

cvs remove file... @@ -596,11 +487,9 @@ Usage: cvs remove [-flR] [files...] -R Process directories recursively. (Specify the --help global option for a list of other help options) - + + + commit

cvs commit file... @@ -609,7 +498,7 @@ Use this command when you wish to ``publish'' your changes to other developers, by incorporating them in the source repository. -NOTE : It's usually a very good idea to do 'cvs update' before commiting changes. +NOTE : It's usually a very good idea to do 'cvs update' before committing changes. bash$ cvs --help commit Usage: cvs commit [-nRlf] [-m msg | -F logfile] [-r rev] files... @@ -622,11 +511,8 @@ Usage: cvs commit [-nRlf] [-m msg | -F logfile] [-r rev] files... -r rev Commit to this branch or trunk revision. (Specify the --help global option for a list of other help options) - + + diff

cvs diff file... @@ -649,11 +535,9 @@ Usage: cvs diff [-lNR] [rcsdiff-options] The most popular is -c for context diffs but there are many more). (Specify the --help global option for a list of other help options) - + + + Creating Releases

Since there usually are several files with different version numbers in a project, @@ -666,30 +550,16 @@ bash$ cvs commit This release can be checked out with bash$ cvs checkout -r "v001" YourProject - Emacs Editor

Emacs is a powerful editor and it supports CVS/RCS - especially for revision merging and comparing. The main Emacs site is at . - Strong, Weak or No Locking

CVS is a powerful system and is highly customizable. CVS supports: @@ -705,16 +575,9 @@ someone else is already editing the file.

No locking - the default permitting concurrent editing of files. - Shell Scripts

The following are wrappers around the basic CVS commands. These scripts @@ -750,31 +613,31 @@ Copy these scripts to /usr/local/bin and this should be in the user's PATH envir sget [-r revision_number] <file/directory name> To get a file or entire directory from CVS in READ ONLY mode. - Click + Click to get this. sedit [-r revision_number] <filename> To edit a file in order to make changes to code. This will lock the file so that nobody else can check it out. Of course you can change the script to your requirement - make no locking, warning message, or very strong locking. - Click + Click to get this. scommit [-r revision_number] <filename> To commit the changes you made to filename or entire directory. Upload your changes to CVS. - Click + Click to get this. supdate <filename/directory> To update a filename or to update an entire directory by getting the latest files from CVS. - Click + Click to get this. sunlock [-r revision_number] <filename> To unlock the file got by sedit. Will release the lock. - Click + Click to get this. slist To see the list of files currently being edited by you. Does 'ls -l | grep | ...' command. - Click . + Click to get this. Note that there is also another Unix command by the name slist (list available Netware servers). You should make sure cvs script slist comes before other in your @@ -782,31 +645,31 @@ Copy these scripts to /usr/local/bin and this should be in the user's PATH envir sinfo <filename/directory> To get the information of changes/revisions to a file. - Click + Click to get this. slog <filename> To get the history of changes/revisions to a file from CVS. - Click + Click to get this. sdif <filename>

sdif -r rev1 -r rev2 <filename> To get the diff of your file with CVS. - Click + Click to get this. NOTE: sdif has only one 'f' because there is already another Unix command called 'sdiff' sadd <filename> To add a new file to CVS repository. - Click + Click to get this. sdelete <filename> To delete a file from CVS repository. - Click + Click to get this. sfreeze <revision name> <directory name> To freeze the code, that is make a release of the entire source tree. - Click + Click to get this.

For example : @@ -817,21 +680,10 @@ Copy these scripts to /usr/local/bin and this should be in the user's PATH envir checkout the entire tree by using the revision name. - - ****************************************************** - -

- CVS Documentation

At Unix prompt type: @@ -879,13 +731,8 @@ The essential command are: cvs diff -r1.4 -r1.5 <filename> This gives a diff between version 1.4 and 1.5 on filename. - Online Documentation

On Linux systems, you can find the CVS documentation in postscript format at @@ -894,29 +741,19 @@ On Linux systems, you can find the CVS documentation in postscript format at bash# cd /usr/doc/cvs* bash# gv cvs.ps - CVS Org Documentation

-The documentation on CVS from "CVS Organisation" is at +The documentation on CVS from "CVS Organization" is at The Official manual for CVS by Cederqvist is at FAQ for CVS is at - CVS Training

@@ -935,16 +772,9 @@ and mirror sites at - Graphical Front Ends

The following GUI front ends for CVS are available: @@ -978,24 +808,13 @@ will look like local folder on MS Windows. See the next section for See MacCvs at and MacCvsPro at - CVS for MS Windows 95/98/NT/2000/XP

- Method 1: Using VNC, Samba

It is VERY STRONGLY recommended that you use @@ -1018,26 +837,19 @@ Advantages of using CVS on Linux/Unix via MS Windows are: A Linux file server (CVS) is very robust, secure and reliable Only one UPS (uninterrupted power supply) battery is required for a linux server. Linux can serve as MS Windows folder through Samba package. - A Linux file server (CVS) supports centralised backups via tools like + A Linux file server (CVS) supports centralized backups via tools like mirrors at -, , , , -, -, -, -, , , , -, -, -, -. +, +, - A Linux file server (CVS) requires just one small server room which can air-contitioned + A Linux file server (CVS) requires just one small server room which can air-conditioned and dust free. Small room keeps the cooling/heating costs down. A Linux file server (CVS) provides security via Unix groups and user id authentication @@ -1093,13 +905,9 @@ University resources: University listings Floppy based PC "X server" - + Method 2: Using Cygwin

You can install the @@ -1107,26 +915,16 @@ and install the CVS clients and SSH packages via Cygwin. With cygwin the Windows 95/NT/2000/XP will be like a Unix client. Bring up the cygwin bash shell prompt and you can access the remote CVS server. With cygwin the Windows 95/NT will be like any other Linux CVS client. - CVS exe for Windows 95/NT/2000/XP

You can install and run CVS on MS Windows directly. Download cvsnt from . See the installation instructions and other documents of CVS on NT/2000 at . - Windows 95/NT/2000/XP FTP Tools

You can also use the ftp tools on MS Windows to transfer files from a Unix/Linux (CVS repository) @@ -1134,13 +932,8 @@ to windows: Go to Tucows and search "ftp tools" for MS Windows - Visual Cafe(Java), JBuilder, MS Visual C++, HTML files

Using Samba and a PC X server it is possible to use CVS on MS Windows platform. @@ -1149,27 +942,15 @@ and others are easily supported by CVS. You can also store the HTML files on a CVS repository via Samba and easily access them from MS Windows. - Samba Admin tool

To administer samba use the admin tools from . Go here and click on "GUI Interfaces Tools". - Security of CVS Repository

To make a CVS server and CVS repository secure do the following: @@ -1184,16 +965,9 @@ do not want to give them a chance to run dangerous programs. Visit and post your security questions in the . - Multi-User CVS Remote Repository

The Cederqvist manual at @@ -1224,12 +998,8 @@ bash# chmod 600 .rhosts See also JA-SIG UPortal CVS repository . - + SSH Authentication

If you're tired of entering passwords for each simple CVS command, then @@ -1294,304 +1064,23 @@ disk, e.g. PGPDisk holding the $HOME directory on the client. So when an intrude takes over your machine s/he needs to know the password for your encrypted disk in order to get further into the server. Another advantage of using a encrypted disk is that your (checked out) source code can reside on it. - RCS Shell Scripts

If you want to use RCS instead of CVS then you can use the following shell scripts. - cotree.sh

- -#!/bin/ksh - -# cotree.sh (Check Out Tree shell script) -# cotree.sh - Check out the entire RCS directory - -# Usage : -# This will get the all the directories -# unix> cotree.sh -# -# This will get just one single directory tree -# unix> cotree.sh - -# See also cofiles.sh - -############################################################### -# Setting up RCS (Revision Control System) -# Install the RCS programs - which gives command co, ci, rcslog -# Create a rcs home directory where you want to put all the -# source code repository. Call this $RCSDIR=/home/rcs_version_control -# Setup up an environment variable RCSDIR=/home/rcs_version_control -# in $HOME/.profile file. Like - -# export RCSDIR=/home/rcs_version_control -# Create a directory structure under $RCSDIR and check in all your -# files using ci . See 'man ci' -# Now create a link from your home directory to your project -# under $RCSDIR -# cd $HOME -# mkdir $HOME/myproject -# cd $HOME/myproject -# and run this script to get all the files and directory tree -# cotree.sh -# This script will create the entire source-tree under user's -# home and also will have a soft link to RCS directories. Each -# user will run this script under his home directory. -############################################################### - -check_out_directory() -{ - # Root directory of RCS (revision control system) - # like RCSDIR=/home/rcs_version_control - RCSDIR=$1 - DIRNAME=$2 - - # The given directory name must exist in rcs root directory - if [ "$DIRNAME" = "" -o ! -d $RCSDIR/$DIRNAME ]; then - print "\nDirectory DIRNAME=$DIRNAME does not exist!!" - print "\nAborting the program ... and exiting...\n" - exit - fi - - mkdir -p $DIRNAME - ln -s $RCSDIR/$DIRNAME/RCS $DIRNAME - ( - cd $DIRNAME - - # This fails in case of filename=sample,vv - # which inside RCS will be RCS/sample,vv,v - # ls RCS | cut -d',' -f1 | xargs co - # Use match to end of name $, as below - - # Use ls RCS/* to avoid getting the names ./ and ../ - #ls RCS/* | cut -d'/' -f2 | sed -e's/,v$//g' | xargs co - if [ -d RCS ]; then - ls RCS/* | cut -d'/' -f2 | sed -e's/,v$//g' | \ - while read ii - do - #echo "ii is : $ii" - if [ -f "RCS/$ii,v" ]; then - co $ii - fi - done - fi - ) -} - -# Root directory of RCS (revision control system) -# like RCSDIR=/home/rcs_version_control -if [ "$RCSDIR" = "" -o ! -d $RCSDIR ]; then - print "\nDirectory RCSDIR=$RCSDIR does not exist!!" - print "\nAborting the program ... and exiting...\n" - exit -fi -#echo "rcsdir is : $RCSDIR" - -# If a directory argument is passed, then check out all -# files for this directory only and exit. -if [ "$1" != "" ]; then - (cd $RCSDIR; find $1 -type d -print ) | - while read DIRNAME - do - #echo DIRNAME=$DIRNAME - #DIRNAME=c_src - # Send rcs root directory and dir name relative to rcs root dir - tmpaa=` basename $DIRNAME ` - if [ "$tmpaa" != "RCS" ]; then - check_out_directory $RCSDIR $DIRNAME - fi - done -else - (cd $RCSDIR; find * -type d -print ) | - while read DIRNAME - do - echo DIRNAME=$DIRNAME - #DIRNAME=c_src - # Send rcs root directory and dir name relative to rcs root dir - tmpaa=` basename $DIRNAME ` - if [ "$tmpaa" != "RCS" ]; then - check_out_directory $RCSDIR $DIRNAME - fi - done -fi - - - cofiles.sh

- -#!/bin/ksh - -# cofiles.sh (Check Out files shell script) -# cofiles.sh - Check out all the files in current directory from RCS -# See also cotree.sh and 'man rcsclean' - -if [ ! -d RCS ]; then - print "\nDirectory RCS does not exist!!" - print "\nAborting the program ... and exiting...\n" - exit -fi - -#echo "No. of args = " $# " and all args " $@ - -while true -do - print -n "\n\nCheck-out all files in read-write mode? [n]: " - read ans - if [ "$ans" = "" -o "$ans" = "n" -o "$ans" = "N" ]; then - ans="N" - break - elif [ "$ans" = "y" -o "$ans" = "Y" ]; then - ans="Y" - break - else - print "\nWrong entry! Try again!!" - fi -done -#echo "The ans is : " $ans - -if [ $# -eq 0 ]; then - # The 'ls RCS' fails in case of filename=sample,vv in RCS/sample,vv,v - # ls RCS | cut -d',' -f1 | xargs co - # Use match to end of name $, as below - - if [ "$ans" = "Y" ]; then - ls RCS | sed -e's/,v$//g' | xargs co -l - else - ls RCS | sed -e's/,v$//g' | xargs co - fi -elif [ $# -eq 1 ]; then - if [ -f "RCS/$1,v" ]; then - # Here, in this case $1 will be like dbalter.sql - # and not like db*.sql.... - #echo "One arg, no. of args = " $# " and all args " $@ - if [ "$ans" = "Y" ]; then - co -l "$1" - else - co "$1" - fi - else - # For case where $1=db*.sql and there is no db*.sql in - # current directory - #echo "No files... no. of args = " $# " and all args " $@ - tmpaa="RCS/$1,v" # will be like RCS/db*.sql,v - ls $tmpaa | \ - while read ii - do - #echo "ii is : $ii" - if [ "$ans" = "Y" ]; then - co -l "$ii" - else - co "$ii" - fi - done - fi -else - for ii in $@ - do - #echo "ii is : $ii,v" - if [ "$ans" = "Y" ]; then - co -l "$ii" - else - co "$ii" - fi - done -fi - - - ciall.sh

- -#!/bin/ksh - -# ciall.sh (Check in files shell script) -# ciall.sh - Check in all the files in current directory into RCS -# This script is very useful for checking in enmass large number -# of new files into RCS. Saves time by avoiding to type the -# 'description' for every file -# And for files already in RCS, it does regular check-in command - - -# To convert filenames to lower case filenames, use this -# technique - use 'tr', see 'man tr' -#ls * | \ -#while read ii -#do -# jj=`echo $ii | tr [A-Z] [a-z] ` -# echo "ii is : $ii" -# echo "jj is : $jj" -# mv $ii $jj -#done - -if [ ! -d RCS ]; then - print "\nDirectory RCS does not exist!!" - print "\nWill be creating RCS directory now ...\n" - mkdir RCS -fi - -print "\n\nNOTE: This is not log message!" -print "Please enter description (will be used for" -print -n "all the files checked in) : " -read description - -# Option prune does not work, use -maxdepth 0 -#find * -prune -type f | - -# The number of args is zero or more.... -if [ $# -eq 0 ]; then - listoffiles="*" -else - listoffiles="$@" -fi - -# Option prune does not work, use -maxdepth 0 -#find $listoffiles -prune -type f | -find $listoffiles -maxdepth 0 -type f | -while read ii -do - #echo $ii - if [ -f "RCS/$ii,v" ]; then - #print "The file $ii already in RCS" - ci -m"$description" $ii - else - #print "The file $ii is new file" - ci $ii << EOF -$description -EOF - fi -done - - Performance Tuning of a CVS Server

For optimum performance a CVS server must be running on a stand alone Linux/Unix box. @@ -1625,16 +1114,9 @@ The X Window managers generally used are KDE, GNOME, CDE, XDM and others. You must exit the X Window immediately after using and most of the time you should see a command line console login prompt on the CVS server machine. - Problem Reporting System

Along with CVS, you may want to use project tracking system or problem @@ -1645,16 +1127,9 @@ and And commercial PRS at look for a project tracking system. - Configuration Management System Tools

What is Configuration Management (CM) ? @@ -1662,7 +1137,7 @@ look for a project tracking system. There are a number of different interpretations. It is about the tracking and control of software development and its activities. That is, it concerns the -mangement of software development projects with +management of software development projects with respect to issues such as multiple developers working on the same code at the same time, targeting multiple platforms, supporting multiple versions, and controlling the @@ -1699,37 +1174,25 @@ Visit the following links: Free CM tools Rational ClearCase tool - Related Sites

Related URLs are at: - Linux goodies -and mirrors at -, + +Linux goodies main site is at +and secondary site at +Mirror sites are at - , , , -, -, -, -, , , , -, -, -, -. +, +, CVS Bubbles CSSC (SCCS like system) @@ -1737,16 +1200,9 @@ and mirrors at SCCS for Linux - SCCS v/s CVS-RCS

SCCS (Source Code Control System) @@ -1771,16 +1227,9 @@ to control concurrent editing of sources by several users working on releases built from a hierarchical set of directories. "RCS is [analogous to using] assembly language, while CVS is [like using] Pascal". - Other Formats of this Document

This document is published in 14 different formats namely: DVI, Postscript, @@ -1837,12 +1286,8 @@ Compiling the source you will get the following commands like: sgml2rtf xxxxhowto.sgml (to generate RTF file) sgml2latex xxxxhowto.sgml (to generate latex file) - + Acrobat PDF format

A PDF file can be generated from postscript file using @@ -1871,12 +1316,8 @@ converts PostScript files to Portable Document Format (PDF) files. called pdfwrite. In order to use ps2pdf, the pdfwrite device must be included in the makefile when Ghostscript was compiled; see the documentation on building Ghostscript for details. - + Convert Linuxdoc to Docbook format

This document is written in linuxdoc SGML format. The Docbook SGML format @@ -1904,12 +1345,8 @@ And you may have to manually edit some of the minor errors after running the Perl script. For example you may need to put closing tag < /Para> for each < Listitem> - + Convert to MS WinHelp format

You can convert the SGML howto document to a Microsoft Windows Help file, @@ -1920,12 +1357,8 @@ First convert the sgml to html using: Then use the tool . You can also use sgml2rtf and then use the RTF files for generating winhelp files. - + Reading various formats

In order to view the document in dvi format, use the xdvi program. The xdvi @@ -1966,1883 +1399,22 @@ You can read an HTML format document using Netscape Navigator, Microsoft Interne explorer, Redhat Baron Web browser or any of the 10 other web browsers. You can read the latex, LyX output using LyX an X Window front end to LaTex. - Copyright and License

-Copyright Al Dev (Alavoor Vasudevan) 1998-2000. +Copyright Al Dev (Alavoor Vasudevan) 1998-2002. License is GNU GPL, but it is requested that you retain the author's name and email on all copies. - - sget

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sget -# Program to check out the file from CVS read-only - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname=$1 - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# Check if file already exists.... -if [ -f "$HOME/$subdir/$fname" ]; then - tmpaa="$HOME/$subdir/$fname" - user_perms=" " - group_perms=" " - other_perms=" " - user_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b3-3 ` - group_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b6-6 ` - other_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | 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 - -# Move the file -mkdir -p "$HOME/$subdir" -touch "$HOME/$subdir/$fname" 2>/dev/null -\mv -f "$HOME/$subdir/$fname" "$HOME/$subdir/$fname.$bkextn" - -# Create subshell -( - cd $homedir - - # Use -A option to clear all sticky flags - if [ "$FLAG1" = "" ]; then - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $fname - else - cvs -r checkout -A "$subdir/$fname" - fi - else - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A -$FLAG1 $OARG1 $fname - else - cvs -r checkout -A -$FLAG1 $OARG1 "$subdir/$fname" - fi - fi -) -#pwd - -if [ -f "$HOME/$subdir/$fname" ]; then - print "\nREAD-ONLY copy of the file $subdir/$fname obtained." - print "Done $cmdname" - #print "\nTip (Usage): $cmdname \n" -fi - - - sedit

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sedit -# Program to check out the file from CVS read/write mode with locking - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -bkextn=sedit_bak - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname=$1 - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# 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 -mkdir -p "$CVSROOT/$subdir/Locks" 2>/dev/null - -if [ ! -e "$CVSROOT/$subdir/$fname,v" ]; then - print "\nError: File $fname does not exist in CVS repository!!\n" - exit -fi - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Get the tip revision number of the file.... -# Use tmpfile as the arg cannot be set inside the sub-shell -tmpfile=$homedir/sedit-lock.tmp -\rm -f $tmpfile 2>/dev/null -if [ "$FLAG1" = "" ]; then - ( - cd $homedir - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs log $fname | head -6 | grep head: | awk '{print $2}' > $tmpfile - else - cvs log "$subdir/$fname" | head -6 | grep head: | awk '{print $2}' > $tmpfile - fi - ) - OARG1=`cat $tmpfile` - \rm -f $tmpfile 2>/dev/null -fi - -lockfile="$CVSROOT/$subdir/Locks/$fname-$OARG1" -#echo "lockfile is : " $lockfile -#if [ -e $lockfile -a "$FLAG2" = "" ]; then -if [ -e $lockfile ]; then - print "\nError: File $fname 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 "$HOME/$subdir/$fname" ]; then - ( - cd $homedir - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout $fname 1>/dev/null - else - cvs -r checkout "$subdir/$fname" 1>/dev/null - fi - ) -fi - -# Check if file already exists.... -tmpaa="$HOME/$subdir/$fname" -if [ -f $tmpaa ]; then - user_perms=" " - group_perms=" " - other_perms=" " - user_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b3-3 ` - group_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b6-6 ` - other_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | 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 $tmpaa is read-only." - #print "Hence I am moving it to $tmpaa.$bkextn ....\n" - \mv -f $tmpaa $tmpaa.$bkextn - chmod 444 $tmpaa.$bkextn -elif [ -d $tmpaa ]; then - print "\nError: $tmpaa is a directory and NOT a file. Aborting $cmdname ....\n" - exit -fi - -# Create subshell -print "\nNow getting the file $fname from CVS repository ...\n" -( - cd $homedir - # Use -A option to clear the sticky tag and to get - # the HEAD revision version - if [ "$FLAG1" = "" ]; then - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -w checkout -A $fname - else - cvs -w checkout -A "$subdir/$fname" - fi - else - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -w checkout -A -$FLAG1 $OARG1 $fname - else - cvs -w checkout -A -$FLAG1 $OARG1 "$subdir/$fname" - fi - fi -) - -if [ -e "$HOME/$subdir/$fname" ]; then - # The lockfile is $CVSROOT/$subdir/Locks/$fname-$OARG1 - touch $lockfile - if [ -e $lockfile ]; then - print "\nDone $cmdname" - else - print "\nFatal Error: File $fname Revision $OARG1 not locked !!" - print "\nCheck the reason for this failure.. before proceeding..." - fi -fi - -#pwd - -#print "\nTip (Usage): $cmdname \n" - - - - scommit

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program scommit -# Program to commit the changes and check in the file into CVS - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play a important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -# Find sub-directory -cur_dir=`pwd` -#echo $cur_dir -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname=$1 - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -# echo "subdir is : " $subdir -# echo "fname is : " $fname - -# 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 -mkdir -p "$CVSROOT/$subdir/Locks" 2>/dev/null - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Get the working revision number of the file.... -# Use tmpfile as the arg cannot be set inside the sub-shell -tmpfile=$homedir/sedit-lock.tmp -\rm -f $tmpfile 2>/dev/null -if [ "$FLAG1" = "" ]; then - ( - cd $homedir - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs status $fname 2>/dev/null | grep "Working revision:" | awk '{print $3}' >$tmpfile - else - cvs status "$subdir/$fname" 2>/dev/null | grep "Working revision:" | awk '{print $3}' >$tmpfile - fi - ) - OARG1=`cat $tmpfile` - \rm -f $tmpfile 2>/dev/null -fi - -if [ "$OARG1" = "" -o "$OARG1" = "New" -o "$OARG1" = "NEW" ]; then - print "The file $subdir/$fname is NEW, it is not in the CVS repository" - print "The OARG1 is $OARG1" -else - lockfile="$CVSROOT/$subdir/Locks/$fname-$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 $subdir/$fname 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 - # The file must exist in cvs - if [ -f "$CVSROOT/$subdir/$fname,v" ]; then - print "You did not lock the file $subdir/$fname with sedit!!" - print "Aborting the $cmdname ...." - exit 2 - else - print "\nThe file $subdir/$fname does not exist in CVS repository yet!!" - print "You should have done sadd on $subdir/$fname ...." - exit 2 - fi - fi -fi - -# Operate inside sub-shell - and operate from root directory -( - cd $homedir - - # Do not allow directory commits for now ... - #if [ -d "$subdir/$fname" ]; then - # cvs commit "$subdir/$fname" - #fi - - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs commit $fname - else - cvs commit "$subdir/$fname" - fi - exit_status=$? - - if [ $exit_status -eq 0 ]; then - lockfile="$CVSROOT/$subdir/Locks/$fname-$OARG1" - if [ -e $lockfile ]; then - \rm -f $lockfile - fi - - # Must change the permissions on file in case - # there are no changes to file - chmod a-w "$HOME/$subdir/$fname" - print "\nDone $cmdname. $cmdname successful" - #print "\nTip (Usage): $cmdname \n" - fi -) - - - supdate

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program supdate -# Program to update the file from CVS read/write mode - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -cmdname=`basename $0` - -if [ $# -lt 1 ]; then - print "\nUsage: $cmdname " - exit -fi - -# Put double quotes to protect spaces in $1 -tmpaa="$1" - -# Check if file already exists.... -if [ $# -gt 0 -a -f $tmpaa ]; then - user_perms=" " - group_perms=" " - other_perms=" " - user_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b3-3 ` - group_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | cut -b6-6 ` - other_perms=`ls -l $tmpaa | awk '{print $tmpaa }' | 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 "$tmpaa to $tmpaa.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 $tmpaa.supdate_bak ]; then - print "\nWarning : File $tmpaa.supdate_bak already exists!!" - print "Please examine the file $tmpaa.supdate_bak and delete it" - print "and then re-try this $cmdname " - print "Aborting $cmdname ...." - exit - else - cp $tmpaa $tmpaa.supdate_bak - break - fi - elif [ "$ans" = "n" -o "$ans" = "N" -o "$ans" = "" -o "$ans" = " " ]; then - exit - fi - done - fi -fi - -if [ -d $tmpaa ]; then - print "\nDirectory update is disabled because cvs update" - print "merges the changes from repository to your working directory." - print "Hence give the filename to update - as shown below: " - print " Usage: $cmdname " - exit -# cvs update -else - cvs update $tmpaa -fi - -print "\nDone $cmdname. $cmdname successful" -print "\n\nThe original file is backed-up to $tmpaa.supdate_bak" -print "\nHence your original file is SAVED to $tmpaa.supdate_bak" -print "\n\n" -#print "\nTip (Usage): $cmdname \n" - - - sunlock

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sunlock -# Program to unlock the file to release the lock done by sedit - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname=$1 - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -cvs_root=` echo $CVSROOT | cut -f1 -d' ' ` -if [ "$cvs_root" = "" ]; then - print "\nError: \$CVSROOT is not set!!\n" - exit -fi - -if [ ! -e "$CVSROOT/$subdir/$fname,v" ]; then - print "\nError: File $fname does not exist in CVS repository!!\n" - exit -fi - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Get the tip revision number of the file.... -# Use tmpfile as the arg cannot be set inside the sub-shell -tmpfile=$homedir/sunlock-lock.tmp -\rm -f $tmpfile 2>/dev/null -if [ "$FLAG1" = "" ]; then - # Operate inside sub-shell - from root directory - ( - cd $homedir - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs log $fname | head -6 | grep head: | awk '{print $2}' > $tmpfile - else - cvs log "$subdir/$fname" | head -6 | grep head: | awk '{print $2}' > $tmpfile - fi - ) - OARG1=`cat $tmpfile` - \rm -f $tmpfile 2>/dev/null -fi - -lockfile="$CVSROOT/$subdir/Locks/$fname-$OARG1" -#echo lockfile is : $lockfile -if [ ! -e $lockfile ]; then - print "\nFile $fname 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 "Are you sure? Do you really want to unlock the file ? [n]: " - read ans - if [ "$ans" = "y" -o "$ans" = "Y" ]; then - break - elif [ "$ans" = "" -o "$ans" = " " -o "$ans" = "n" -o "$ans" = "N" ]; then - exit - else - print "\n\nWrong entry. Try again..." - sleep 1 - 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 $fname is NOT locked by anyone" - print " " -fi - - - slist

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - Note that there is also another Unix - command by the name slist (list available Netware servers). You - should make sure the CVS script slist comes before other in your - PATH environment. - - -#!/bin/ksh - -# CVS program slist -# Program to list all edited source files from CVS - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -# Usage: -# $ slist (All files and sub-directories) -# $ slist *.* (All files) -# $ slist * (All files and sub-directories) -# $ slist ab* (All files starting with ab wild-card) - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir - -# 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 - -# If the current directory tree is not in cvs-root then exit -if [ ! -d $CVSROOT/$subdir ]; then - print "\nThe directory $subdir does not exist in $CVSROOT" - exit -fi - -#echo "no of params : " $# -#echo "The arg $ 1 is : " $1 -#echo "all args : " $@ - -if [ $# -eq 0 ]; then - #tmpbb=` find * -prune -type d ` - tmpbb=` find * -maxdepth 0 -type d ` -elif [ $# -eq 1 ]; then - if [ "$1" = "." ]; then - #tmpbb=` find * -prune -type d ` - tmpbb=` find * -maxdepth 0 -type d ` - else - if [ -d $1 -a ! -d $CVSROOT/$subdir/$1 ]; then - print "\nThe directory $subdir/$1 does not exist in $CVSROOT" - exit - fi - tmpbb=$@ - fi -else - tmpbb=$@ -fi - -#echo "The tmpbb is : " $tmpbb - -# Now, remove all the directory names which are not in cvs-root -dirnames="" -for ii in $tmpbb ; do - if [ -d $CVSROOT/$subdir/$ii ]; then - dirnames="$dirnames $ii " - fi -done -#echo "The dirnames is : " $dirnames - -if [ "$dirnames" != "" ]; then - find $dirnames -type f | - while read ii - do - # List only those files which are in cvs system - if [ -f "$CVSROOT/$subdir/$ii,v" ]; then - #echo "ii is : " $ii - ls -l $ii | grep ^\-rw - fi - done; -fi - -# Get all the files in the current directory -listfiles=`ls $tmpbb ` -# Option prune does not work use maxdepth -#find * -prune -type f | -find * -maxdepth 0 -type f | -while read ii -do - for jj in $listfiles ; do - if [ "$jj" = "$ii" ]; then - # List only those files which are in cvs system - if [ -f "$CVSROOT/$subdir/$ii,v" ]; then - #echo "ii is : " $ii - ls -l $ii | grep ^\-rw - fi - fi - done -done; - - - sinfo

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sinfo -# Program to get the status of files in working directory - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname=$1 - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Create subshell -if [ -f $1 ]; then - ( - cd $homedir - clear - print "\ncvs status is : " - cvs status "$subdir/$fname" - ) -elif [ -d $1 ]; then - ( - cd $homedir - clear - print "\ncvs status is : " - tmpfile="$homedir/cvs_sinfo.tmp" - rm -f $tmpfile - echo " " >> $tmpfile - echo " ****************************************" >> $tmpfile - echo " Overall Status of Directory" >> $tmpfile - echo " ****************************************" >> $tmpfile - cvs release "$subdir/$fname" 1>>$tmpfile 2>>$tmpfile << EOF -N -EOF - echo "\n -------------------------------\n" >> $tmpfile - - aa=`cat $tmpfile | grep ^"M " | awk '{print $2}' ` - for ii in $aa - do - jj="(cd $homedir; 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 - - - slog

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program slog -# Program to list history of the file in CVS - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -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 - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname="$1" - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Operate inside a sub-shell -( - cd $homedir - cvs log "$homedir/$subdir/$fname" | less -) - -print "\nDone $cmdname. $cmdname successful" -#print "\nTip (Usage): $cmdname \n" - - - sdif

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sdif -# Program to see difference of the working file with CVS copy - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -cmdname=`basename $0` - -Usage() -{ - print "\nUsage: $cmdname " - print "$cmdname -r -r \n" - exit -} - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -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 - -cur_dir=`pwd` -#echo $cur_dir - -len=${#homedir} -len=$(($len + 2)) -#echo $len - -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname $1` -if [ "$tmpaa" = "." ]; then - fname="$1" - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename $1` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Operate inside sub-shell -( - cd $homedir - if [ "$FLAG1" = "" ]; then - cvs diff -r HEAD "$homedir/$subdir/$fname" | less - else - cvs diff -$FLAG1 $OARG1 -$FLAG2 $OARG2 "$homedir/$subdir/$fname" | less - fi -) - - - sadd

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sadd -# Program to add the file to CVS - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -cmdname=`basename $0` -if [ $# -lt 1 ]; then - print "\nUsage: $cmdname \n" - exit -fi - -onearg="$1" -if [ ! -f "$onearg" -a ! -d "$onearg" ]; then - print "\nArgument $onearg is not a file or a directory!" - print "Usage: $cmdname \n" - exit -fi - -# Argument is a directory name ..... -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cvs_root=` echo $CVSROOT | cut -f1 -d' ' ` -if [ "$cvs_root" = "" ]; then - print "\nError: \$CVSROOT is not set!!\n" - exit -fi - -cur_dir=`pwd` -len=${#homedir} -len=$(($len + 2)) -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname "$onearg" ` -if [ "$tmpaa" = "." ]; then - fname="$onearg" - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename "$onearg" ` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Check if file exists .... -if [ $# -eq 1 ]; then - if [ -f "$onearg" ]; then - cvs add "$onearg" - exit - fi -elif [ $# -gt 1 ]; then - print "\n\n\nAdding all the files in the current directory to CVS" - print "Directories will not be added" - print -n "Hit return to continue or CTRL+C to abort..." - read ans - for ii in $@ - do - if [ -f "$ii" ]; then - cvs add "$ii" - fi - done; - exit -fi - -# When $subdir is "." then you are at the root directory -if [ "$subdir" = "." ]; then - # The $onearg is a directory and not a file at this point... - if [ -d "$CVSROOT/$onearg" ]; then - print "\nDirectory $onearg already exists in CVSROOT" - exit - else - # You are adding at root directory $CVSROOT - if [ "$2" = "" -o "$3" = "" ]; then - print "\nUsage: $cmdname " - print "For example - " - print " $cmdname foo_directory V_1_0 R_1_0" - exit - else - ( - cd "$homedir/$subdir"; - cvs import "$onearg" $2 $3 - ) - fi - fi -else - # If current directory exists in CVS... - if [ -d "$CVSROOT/$subdir/$onearg" ]; then - print "\nDirectory $onearg already in CVS repository!" - exit - else - ( - if [ -d "$homedir/$subdir/$onearg/CVS" ]; then - print "\nError: Directory $homedir/$subdir/$onearg/CVS exists!!" - print "\nAborting now ...." - exit - fi - - # For import you MUST change to target directory - # and you MUST specify full-path starting with $subdir - cd "$homedir/$subdir/$onearg"; - cvs import "$subdir/$onearg" Ver_1 Rel_1 - ) - fi -fi - - - sdelete

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sdelete -# Program to delete the file from CVS - -# Every filename is composed of 3 parts - Home directory, sub-directory -# and the filename. The full-path is $HOME/$subdir/$fname -# And in CVS the same directory structure is maintained (by -# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname -# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname -# play an important role. For example, sample values can be like -# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot -# and fname=foo.cpp - -# Caution: Put double-quotes to protect the variables having -# spaces, like "$HOME/$subdir" if subdir is 'some foo.cpp' - -cmdname=`basename $0` - -if [ $# -lt 1 ]; then - print "\nUsage: $cmdname \n" - exit -fi - -onearg="$1" - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -len=${#homedir} -len=$(($len + 2)) -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir -tmpaa=`dirname "$onearg" ` -if [ "$tmpaa" = "." ]; then - fname="$onearg" - if [ "$subdir" = "" ]; then - subdir=$tmpaa - fi -else - fname=`basename "$onearg" ` - if [ "$subdir" = "" ]; then - subdir=$tmpaa - else - subdir="$subdir/$tmpaa" - fi -fi -#echo "subdir is : " $subdir -#echo "fname is : " $fname - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -# Operate inside a sub-shell ... -( - cd $homedir - - # Check if file does not exist.... - if [ ! -f "$subdir/$fname" ]; then - # Try to get the file from CVS - sget "$subdir/$fname" - if [ ! -f "$subdir/$fname" ]; then - print "\nError: $subdir/$fname does NOT exist in CVS repository." - print "\nAborting $cmdname ......" - exit - fi - fi - - bkextn=cvs_sdelete_safety_backup - \mv -f "$subdir/$fname" "$subdir/$fname.$bkextn" - - cvs remove "$subdir/$fname" - - print "\nsdelete command removes the file from CVS repository" - print "and archives the file in CVS Attic directory. In case" - print "you need this file in future then contact your CVS administrator" - print " " - - print "\nDone $cmdname. $cmdname successful" - print "Run scommit on $homedir/$subdir/$fname to" - print "make this change permanent" - \mv -f "$subdir/$fname.$bkextn" "$subdir/$fname" -) - - - sfreeze

-NOTE : Get the Korn shell /bin/ksh by installing pdksh*.rpm from -the Linux contrib cdrom - -Save this file as a text file and chmod a+rx on it. - - -#!/bin/ksh - -# CVS program sfreeze -# Program to freeze and cut out the release of source tree from CVS - -cmdname=`basename $0` - -Usage() -{ - clear - print "\nUsage: $cmdname symbolic_tag " - - print "\nFor example :- " - print " cd \$HOME" - print " $cmdname REVISION_1 myprojectsource_directory" - print "To see the list of revisons do -" - print "slog and see the symbolic name and do -" - print "cvs history -T" - - print "\nTo create a branch off-shoot from main trunk, use" - print "the -b and -r options which makes the tag a branch tag. This is" - print "useful for creating a patch to previously released software" - print "For example :- " - print " cd \$HOME" - print " cvs rtag -b -r REVISION_1 REVISION_1_1 myprojectsource_directory" - print " " - -# print "\nTag info is located at \$CVSROOT/CVSROOT/taginfo,v" -# print "You can do - cd $HOME; sget CVSROOT" -# print "to see this file" - 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 2 ]; then - Usage -fi - -if [ ! -d $2 ]; then - print "\nError: Second argument $2 is not a directory!" - print " Aborting $cmdname...." - print " " - exit -fi - -homedir=` echo $HOME | cut -f1 -d' ' ` -if [ "$homedir" = "" ]; then - print "\nError: \$HOME is not set!!\n" - exit -fi - -cur_dir=`pwd` -len=${#homedir} -len=$(($len + 2)) -subdir=` echo $cur_dir | cut -b $len-2000 ` -#echo "subdir is : " $subdir - -# CVS directory in your local directory is required for all commands.. -if [ ! -d "$homedir/$subdir/CVS" ]; then - #tmpaa=` (cd "$CVSROOT/$subdir"; find * -prune -type f -print | head -1 ) ` - tmpaa=` (cd "$CVSROOT/$subdir"; find * -maxdepth 0 -type f -print | head -1 ) ` - tmpbb=`basename $tmpaa | cut -d',' -f1 ` - if [ "$tmpaa" = "" -o ! -f "$CVSROOT/$subdir/$tmpbb,v" ]; then - print "\nThe directory $homedir/$subdir/CVS does not exist" - print "You must do a sget on `basename $subdir` directory. Give -" - print " cd $homedir/`dirname $subdir` " - print " sget `basename $subdir` " - exit - else - # Now try to create CVS in local dir by sget - ( - cd "$homedir" - if [ "$subdir" = "." ]; then # don't use dot, will mess up cvs - cvs -r checkout -A $tmpbb - else - cvs -r checkout -A "$subdir/$tmpbb" - fi - ) - fi -fi - -if [ "$cur_dir" != "$homedir" ]; then - print "\nYou are not in home directory $homedir!!" - print "You must give the sfreeze command " - print "from home directory $homedir" - exit -fi - -# cvs rtag symbolic_tag -cvs rtag $1 $2 - -print "\nDone $cmdname. $cmdname successful" - - diff --git a/LDP/howto/linuxdoc/Modem-Dialup-NT-HOWTO.sgml b/LDP/howto/linuxdoc/Modem-Dialup-NT-HOWTO.sgml index c60740f4..81ee9c9d 100644 --- a/LDP/howto/linuxdoc/Modem-Dialup-NT-HOWTO.sgml +++ b/LDP/howto/linuxdoc/Modem-Dialup-NT-HOWTO.sgml @@ -46,7 +46,7 @@ Modem-Dialup-NT HOW-TO alavoor[AT]yahoo.com" name=" alavoor[AT]yahoo.com"> -v1.5, 01 June 2002 +v1.7, 22 June 2002 This document will help you to setup the Modem to do Dial-up Networking with remote server like Windows NT RAS or @@ -59,16 +59,6 @@ do Dial-Up Networking on Linux very similar to that of MS Windows dialup network - Introduction

@@ -104,14 +94,10 @@ With PPP you can make a link between two hosts which understand the protocol. A 'Remote Access Service' (RAS) link. First, see if your modem is supported by linux. -Internal Modems (WinModems) do not work with linux. Some WinModems -require special tweaking to make it work in linux. - +Internal Modems (WinModems) may work with Linux because they need extra +software drivers to make it work with Linux. +Test your WinModem to see if it works under Linux. +Some WinModems require special tweaking to make it work in Linux. Preparations

Check if you have all the needed hardware, software and data and hand: @@ -144,16 +130,95 @@ With an internal modem, use HardDrake to check if the system sees the modem. Or ISA bus modem, check '/etc/isapnp.conf' if it is listed there. If you don't have that file, you'll have to generate it. Read isapnpfaq.txt in the isapnptools doc directory or man isapnp or man isapnp.conf. - Quick Steps to Dialup Networking

These quick steps will enable you to setup dial-up networking on Linux in just five minutes. @@ -433,12 +498,6 @@ bash# route add default gw 172.28.36.3 - Troubleshooting

In case you have problems: @@ -459,12 +518,6 @@ to check which route is being used, do: bash# traceroute www.yahoo.com bash# traceroute remotehostname - Graphical Tools

Preference should be given the console line commands as in previous section, but @@ -485,16 +538,10 @@ And select Networking->Client Tasks->Routing & Gateways->Set Other Routes to net bash# rp3 & bash# rp3-config & - Remote connection with VNC

Once you have connection through PPP to remote machines, @@ -526,12 +573,6 @@ Or you can download the qvwm source for solaris from Troubleshooting compile: You should put unsigned long before arg in usleep() usleep((unsigned long) 10000) - Microsoft "MS Outlook" Email from PPP

Method 1 : @@ -569,16 +610,10 @@ Method 3 : Web based - Setup RAS server

For details on RAS please see @@ -637,16 +672,10 @@ technical users who already have the PC and are willing to face the potential pr components. But, the PCI adapters for RAS available in the market today still carry a price tag that makes it difficult to justify a server-based solution. - Related URLs

@@ -686,16 +715,10 @@ Mirror sites are at - , , , - Other Formats of this Document

This document is published in 14 different formats namely: DVI, Postscript, @@ -752,12 +775,6 @@ Compiling the source you will get the following commands like: sgml2rtf xxxxhowto.sgml (to generate RTF file) sgml2latex xxxxhowto.sgml (to generate latex file) - Acrobat PDF format

A PDF file can be generated from postscript file using @@ -789,12 +806,6 @@ converts PostScript files to Portable Document Format (PDF) files. called pdfwrite. In order to use ps2pdf, the pdfwrite device must be included in the makefile when Ghostscript was compiled; see the documentation on building Ghostscript for details. - Convert Linuxdoc to Docbook format

This document is written in linuxdoc SGML format. The Docbook SGML format @@ -820,12 +831,6 @@ And you may have to manually edit some of the minor errors after running the Perl script. For example you may need to put closing tag < /Para> for each < Listitem> - Convert to MS WinHelp format

You can convert the SGML howto document to a Microsoft Windows Help file, @@ -836,12 +841,6 @@ First convert the sgml to html using: Then use the tool . You can also use sgml2rtf and then use the RTF files for generating winhelp files. - Reading various formats

In order to view the document in dvi format, use the xdvi program. The xdvi @@ -882,26 +881,14 @@ You can read an HTML format document using Netscape Navigator, Microsoft Interne explorer, Redhat Baron Web browser or any of the 10 other web browsers. You can read the latex, LyX output using LyX an X Window front end to LaTex. - Convert HTML to SGML html2sgml

To convert any HTML document to Linuxdoc SGML use the tool 'html2sgml' from . - Copyright

Copyright policy is GNU/GPL as per LDP (Linux Documentation project). @@ -910,16 +897,10 @@ Additional restrictions are - you must retain the author's name, email address and this copyright notice on all the copies. If you make any changes or additions to this document then you should intimate all the authors of this document. - Appendix A Connecting Linux + PPP < -- > NT + RAS...

This section is written by @@ -1018,13 +999,4 @@ John Newbigin ( jn@it.swin.edu.au"> ). -