#!/bin/bash -epux # $Id: //guest/daniel_kionka/save-clients/gen-clients.bash#1 $ # # This script is used to update all client snapshots in this directory. # Note that updating the files in this directory do not update the clients. # # To add a new client snapshot, create an empty file and rerun the script. # You can "touch client-name.txt". # # These snapshots can then be checked in so you have a permanent record of the # clients you used. Running p4 edit/add and p4 submit is still manual. # Remember to run p4 diff -sr and revert unchanged files. for file in *; do case $file in *.txt ) client=$(basename $file .txt) p4 client -o $client > tmp # ignore Update: and Access: changes diff -I '.*:.*200./../.. ..:..:..' $file tmp || mv tmp $file ;; esac done rm -f tmp