Revision 16,
539 bytes
checked in by marcus, 15 years ago
(diff) |
r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines
Initial import
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #! /bin/csh |
---|
2 | # |
---|
3 | # file makemd5.csh |
---|
4 | # =========== |
---|
5 | # |
---|
6 | # version 1, 26-Oct-2006 |
---|
7 | # |
---|
8 | # Creates md5 checksum file on current directory |
---|
9 | # K. Stammler, 26-Oct-2006 |
---|
10 | |
---|
11 | if (! -w /tmp) then |
---|
12 | echo "cannot write to /tmp. Abort." |
---|
13 | exit |
---|
14 | else if (! -w $PWD) then |
---|
15 | echo "cannot write to $PWD. Abort" |
---|
16 | exit |
---|
17 | endif |
---|
18 | |
---|
19 | set tmpfile=/tmp/mkmd5_$$ |
---|
20 | find . -type f >$tmpfile |
---|
21 | |
---|
22 | set md5=checksum.md5 |
---|
23 | if (-e $md5) \rm $md5 |
---|
24 | touch $md5 |
---|
25 | |
---|
26 | set cnt=1 |
---|
27 | while (1 > 0) |
---|
28 | set f=`sed -n $cnt"p" $tmpfile` |
---|
29 | if ("$f" == "") break |
---|
30 | md5sum $f >>$md5 |
---|
31 | @ cnt ++ |
---|
32 | end |
---|
33 | |
---|
34 | \rm $tmpfile |
---|
Note: See
TracBrowser
for help on using the repository browser.