#! /bin/csh -f # Last edited on 2001-04-10 20:41:56 by mc726 set usage = "$0 [ --help | -h ] FILE.java" while ( ( $#argv > 0 ) && ( "$1" =~ -* ) ) if ( ( $#argv > 0 ) && ( "$1" == "--help" ) ) then echo "usage: ${usage}"; exit 0 else echo 'invalid option "'"$1"'"'; echo "usage: ${usage}"; exit 1 endif end if ( $#argv != 1 ) then echo 'invalid args'; echo "usage: ${usage}"; exit 1 endif set file = "$1"; if ( ".${file:e}" != ".java" ) set file = "${file}.java" if ( ! ( -r ${file} ) ) then echo "file ${file} doesn't exist or is not readable"; exit 1 endif set bin = /home/spec/mc726/PUB/2001-1/bin set pck = `${bin}/getpackage ${file}` if ( "/${pck}" == "/NONE" ) then echo 'I could not find a "package" line in file '"${file}" exit 1 endif if ( ! ( -d ${rep}/${pck} ) ) then echo 'package "'"${pck}"'" does not exist'; exit 1 endif # Perform the checkin # ${bin}/docheckin ${pck} ${file} # ${bin}/waitawhile ${pck}/${file} # ${bin}/acquire-lock ${pck}/${file} set lastver = `${bin}/get-last-version ${pck} ${file}` @ ver = ${lastver} + 1 echo "checkin ${pck}/${file} ${ver} ${dt}"