rcsst 795 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. save_ifs=$IFS
  3. IFS=$(echo -en "\n\b")
  4. folders=$(find . -type d -not -name 'RCS')
  5. for folder in $folders; do
  6. echo "checking $folder..."
  7. # Shows any RCS Modificiation ins current directory
  8. new=$(find "$folder" -maxdepth 1 -type f | xargs rcsdiff -q 2>&1 | egrep ^rcsdiff | grep -i 'no such file' | cut -d':' -f 2 | sed -e 's/\.\/RCS\///' -e 's/\,v//')
  9. if [[ -n "$new" ]]; then
  10. echo "# The following files are not under version control: "
  11. echo "#"
  12. echo $new
  13. fi
  14. mods=$(find "$folder" -maxdepth 1 -type f | xargs rcsdiff -q 2>&1 | egrep ^rcsdiff | grep -vi 'no such file' | cut -d':' -f 2 | sed -e 's/\,v//')
  15. if [[ -n "$mods" ]]; then
  16. echo
  17. echo "# The following files have modifications: "
  18. echo '#'
  19. echo $mods
  20. fi
  21. done
  22. IFS=$save_ifs