1*733ed737Ssommerfe#! /bin/ksh -p 2*733ed737Ssommerfe# 3*733ed737Ssommerfe# CDDL HEADER START 4*733ed737Ssommerfe# 5*733ed737Ssommerfe# The contents of this file are subject to the terms of the 6*733ed737Ssommerfe# Common Development and Distribution License (the "License"). 7*733ed737Ssommerfe# You may not use this file except in compliance with the License. 8*733ed737Ssommerfe# 9*733ed737Ssommerfe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*733ed737Ssommerfe# or http://www.opensolaris.org/os/licensing. 11*733ed737Ssommerfe# See the License for the specific language governing permissions 12*733ed737Ssommerfe# and limitations under the License. 13*733ed737Ssommerfe# 14*733ed737Ssommerfe# When distributing Covered Code, include this CDDL HEADER in each 15*733ed737Ssommerfe# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*733ed737Ssommerfe# If applicable, add the following below this CDDL HEADER, with the 17*733ed737Ssommerfe# fields enclosed by brackets "[]" replaced with your own identifying 18*733ed737Ssommerfe# information: Portions Copyright [yyyy] [name of copyright owner] 19*733ed737Ssommerfe# 20*733ed737Ssommerfe# CDDL HEADER END 21*733ed737Ssommerfe# 22*733ed737Ssommerfe 23*733ed737Ssommerfe# 24*733ed737Ssommerfe# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25*733ed737Ssommerfe# Use is subject to license terms. 26*733ed737Ssommerfe# 27*733ed737Ssommerfe# ident "%Z%%M% %I% %E% SMI" 28*733ed737Ssommerfe# 29*733ed737Ssommerfe 30*733ed737Ssommerfe# 31*733ed737Ssommerfe# The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout 32*733ed737Ssommerfe# under certain circumstances, which can really screw things up; unset it. 33*733ed737Ssommerfe# 34*733ed737Ssommerfeunset CDPATH 35*733ed737Ssommerfe 36*733ed737SsommerfePATH=/usr/bin:/usr/ccs/bin 37*733ed737Ssommerfe 38*733ed737Ssommerfeif [ $# -ne 1 ]; then 39*733ed737Ssommerfe echo "Usage: $0 workspace" 1>&2 40*733ed737Ssommerfe exit 1 41*733ed737Ssommerfefi 42*733ed737Ssommerfe 43*733ed737SsommerfeCODEMGR_WS="$1" 44*733ed737Ssommerfe 45*733ed737Ssommerfeif [ ! -d "${CODEMGR_WS}" ]; then 46*733ed737Ssommerfe echo "${CODEMGR_WS}: not a directory" 1>&2 47*733ed737Ssommerfe echo "Usage: $0 workspace" 1>&2 48*733ed737Ssommerfe exit 1 49*733ed737Ssommerfefi 50*733ed737Ssommerfe 51*733ed737Ssommerfeif [ ! -f "${CODEMGR_WS}"/Codemgr_wsdata/nametable ]; then 52*733ed737Ssommerfe echo "${CODEMGR_WS}: not a workspace (no Codemgr_wsdata/nametable)" 1>&2 53*733ed737Ssommerfe echo "Usage: $0 workspace" 1>&2 54*733ed737Ssommerfe exit 1 55*733ed737Ssommerfefi 56*733ed737Ssommerfe 57*733ed737Ssommerfecd ${CODEMGR_WS} && 58*733ed737Ssommerfewhile read file etc; do 59*733ed737Ssommerfe file="./$file" 60*733ed737Ssommerfe sfile="${file%/*}/SCCS/s.${file##*/}" 61*733ed737Ssommerfe if [ "$sfile" -nt "$file" ]; then 62*733ed737Ssommerfe ls -E "$sfile" 63*733ed737Ssommerfe ls -E "$file" 64*733ed737Ssommerfe echo "reget $file:" 65*733ed737Ssommerfe # -G needed so file doesn't land in working dir. 66*733ed737Ssommerfe sccs get -G "$file" "$file" 67*733ed737Ssommerfe fi 68*733ed737Ssommerfedone < Codemgr_wsdata/nametable 69