backup_diff.sh, backup_full.sh: Prepared for in-place backups
[mgsautils.git] / fs / backup_check.sh
1 #!/bin/sh
2
3 if [ "$#" -eq "0" ]
4 then
5 echo "Usage: $0 backup_directory"
6 exit 1
7 fi
8
9 BAKDIR=$1
10
11 cd ${BAKDIR}
12
13 echo CHECKING ${BAKDIR}:
14 ls -l
15
16 ls -1 *.md5 | while read sumfile
17 do
18 echo
19 echo ${sumfile}:
20 cat ${sumfile}
21 echo
22 # /sbin/md5 -r $(cat ${sumfile} | cut -f2 -d"*") | sed "s/ / */g" | diff - ${sumfile}
23 md5sum -c ${sumfile}
24 echo MD5SUM return value: $?
25 done