#!/bin/bash # Kees Cook # GPL [ "x$1" = "x" ] && { echo 'Edit what file?' exit } DIR=`dirname "$1"` FILE=`basename "$1"` cd "$DIR" [ -d RCS ] || { echo 'There is no RCS directory here. Hit ctrl-C and make one' echo 'or just carry on by pressing enter ...' read } co -l "$FILE" || { echo 'Check out failed! Press enter ...' read } ${EDITOR:-vi} "$FILE" ci -u "$FILE" || { echo 'The check IN failed! Fix it!' }