Advertisement
MaxG

sfvall

Jun 3rd, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. smaug# cat sfvall
  2. #!/bin/bash
  3. #Author: MaxG
  4. #Script to sfvcheck all sfv files in subdirs using chsfv -f command
  5. #The script will check starting from path ($1) or current location (pwd)
  6.  
  7. if [ x"$1" != "x" ] ; then
  8.         p=$1
  9. else
  10.         p=`pwd`
  11. fi
  12.  
  13. log="/tmp/sfvall-result"
  14.  
  15. >$log
  16. #pwd=`pwd`
  17.  
  18. echo "Scanning for SFVs in $p" >> $log
  19. for s in $(find $p -name "*.sfv")
  20. do
  21.         echo "" >> $log
  22.         dirpath=`dirname $s`
  23.         echo $dirpath
  24.         echo "Checking SFV for $s" | tee -a $log
  25. #       echo "Checking SFV for $s"
  26. #       cd $dp
  27.         cksfv -v -c -f $s -C $dirpath | tee -a $log
  28. done
  29.  
  30. read -p "Show log? (y/n): " -n 1 shlog
  31. echo ""
  32.  
  33. if [[ $shlog == "y" ]] ; then
  34.         cat $log
  35. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement