#!/bin/sh # /usr/local/bin/ctms by Julian Stacey from # cd ~jhs/public_html/src/bsd/jhs/bin/local/ctms ; make install # See also for path names: ~/public_html/src/bsd/jhs/bin/local/mail/ctms.mtree # Show the CTM level of all trees. # Shape of tree is compliant with ftp.freebsd.org, # with addition that transient pieces not yet reassembled into # deltas are stored in /pri LINE() { # echo -n "---------------------------------------" # echo "---------------------------------------" # echo } ZONK() { printf "\t%-47s %s\n" $1 "`cat $1/.ctm_status 2<&-`" } BLAA() { if ! test -e $1/.ctm_status ; then printf "\t%-47s %s\n" $1 "No .ctm_status" else ZONK $1 fi } TOP() { # cd $1 && echo "xx `/bin/pwd` xx" && printf "\t%-47s %s\n" `pwd` `ls -1 | tail -1` if test -d $1 ; then cd $1 && printf "\t%-47s %s\n" `pwd` `ls -1 | tail -1` else printf "\t%-47s %s\n" $1 "No directory" fi } # LINE #----------------------------------------------------------------------- CTMV="ctm -v /pub/FreeBSD" TOP /pub/FreeBSD/development/CTM/src-4 for i in \ /pub/FreeBSD/branches/4.0-stable/src \ /pri/FreeBSD/branches/4.0-stable/src \ /pri/FreeBSD/branches/4.0-stable/src \ ; do BLAA $i done i="/usr/src" if test -e $i/.ctm_status ; then if grep -q src-4 $i/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-4/src-4.2[0-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/src-5 for i in \ /pub/FreeBSD/branches/5.0-stable/src \ /pri/FreeBSD/branches/5.0-stable/src \ /pri/FreeBSD/branches/5.0-stable/src \ ; do BLAA $i done i="/usr/src" if test -e $i/.ctm_status ; then if grep -q src-5 $i/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-5/src-5.0[6-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/src-6 for i in \ /pub/FreeBSD/branches/6.0-stable/src \ /pri/FreeBSD/branches/6.0-stable/src \ /pri/FreeBSD/branches/amd64/6.0-stable/src \ /pri/FreeBSD/branches/i386/6.0-stable/src \ ; do BLAA $i done i="/usr/src" if test -e $i/.ctm_status ; then if grep -q src-6 ${YY}/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-6/src-6.1[0-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/src-7 for i in \ /pub/FreeBSD/branches/7.0-stable/src \ /pri/FreeBSD/branches/7.0-stable/src \ /pri/FreeBSD/branches/amd64/7.0-stable/src \ /pri/FreeBSD/branches/i386/7.0-stable/src \ ; do BLAA $i done i="/usr/src" if test -e ${YY}/.ctm_status ; then if grep -q src-7 $i/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-7/src-7.[0-9][0-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/src-8 for i in \ /pub/FreeBSD/branches/8.0-stable/src \ /pri/FreeBSD/branches/8.0-stable/src \ /pri/FreeBSD/branches/amd64/8.0-stable/src \ /pri/FreeBSD/branches/i386/8.0-stable/src \ ; do BLAA $i done i="/usr/src" if test -e ${YY}/.ctm_status ; then if grep -q src-8 $i/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-8/src-8.[0-9][0-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/src-cur # -ltr was used instead of -l as otherwise I saw cvs-cur.9999.gz # listed instead of cvs-cur.10088.gz # but then I went back to ls -l, as when deltas arrive out of time order, # I dont see the last numeric one for i in \ /pub/FreeBSD/branches/-current/src \ /pri/FreeBSD/branches/-current/src \ /pri/FreeBSD/branches/amd64/-current/src \ /pri/FreeBSD/branches/i386/-current/486/src \ /pri/FreeBSD/branches/i386/-current/586/src \ /pri/FreeBSD/branches/i386/-current/686/src \ /pri/FreeBSD/branches/i386/-current/src \ ; do BLAA $i done i="/usr/src" if test -e ${YY}/.ctm_status ; then if grep -q src-cur ${YY}/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/src-cur/src-*.8[5-9][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/ports-cur for i in \ /pub/FreeBSD/branches/-current/ports \ /pri/FreeBSD/branches/-current/ports \ /pri/FreeBSD/branches/amd64/-current/ports \ /pri/FreeBSD/branches/i386/-current/486/ports \ /pri/FreeBSD/branches/i386/-current/586/ports \ /pri/FreeBSD/branches/i386/-current/686/ports \ /pri/FreeBSD/branches/i386/-current/ports \ /usr/ports \ ; do # /pri/FreeBSD/branches/-current/ports: not for compiling, just for make fetch. # ftp.freebsd.org has a daily snapshot in /pub/FreeBSD/ports/ports/ports.tar.gz BLAA $i done i="/usr/ports" if test -e ${YY}/.ctm_status ; then if grep -q ports-cur ${YY}/.ctm_status ; then ZONK $i fi fi echo "${CTMV}/development/CTM/ports-cur/ports-cur.8[0-4][0-9][0-9].gz" LINE #------------------------------------------------------------------------- TOP /pub/FreeBSD/development/CTM/cvs-cur for i in \ /pub/FreeBSD/development/FreeBSD-CVS \ /pri/FreeBSD/development/FreeBSD-CVS \ /usr/cvs \ ; do BLAA $i done echo "${CTMV}/development/CTM/cvs-cur/cvs-cur.16[0-9][0-9][0-9].gz" # LINE #------------------------------------------------------------------------- su_mailnull1="rlogin -l mailnull-csh localhost" # mailnull-csh is a copy of mailnull enabled for a csh. su_mailnull2="unsetenv TMPDIR" echo "$su_mailnull1" echo "$su_mailnull2"