Debian Codegraph @

build_tools/sha1sum-sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 check=0
4 status=0
5
6 while [scip-shell system . . `[`. x"$1" != x ]; do
7 case $1 in
8 -c)
9 check=1
10 shift
11 continue;;
12 --status)
13 status=1
14 shift
15 continue;;
16 -*)
17 if [scip-shell system . . `[`. $status = 0 ]; then
18 echoscip-shell system . . echo. "Unrecognized option $1" 1>&2
19 fi
20 exit 1
21 ;;
22 *)
23 dst=$1
24 shift
25 continue;;
26 esac
27 done
28
29 if [scip-shell system . . `[`. x"$dst" = x ]; then
30 if [scip-shell system . . `[`. $status = 0 ]; then
31 echoscip-shell system . . echo. "Usage: $0 [<options>] <filename>" 1>&2
32 fi
33 exit 1
34 fi
35
36 if [scip-shell system . . `[`. $check = 1 ]; then
37 if [scip-shell system . . `[`. -f $dst ]; then
38 sum1=`cutscip-shell system . . cut. -d' ' -f1 $dst`
39 file=`cutscip-shell system . . cut. -d' ' -f3 $dst`
40 sum2=`opensslscip-shell system . . openssl. sha1 $file | cutscip-shell system . . cut. -d' ' -f2`
41 if [scip-shell system . . `[`. x"$sum1" = x"$sum2" ]; then
42 if [scip-shell system . . `[`. $status = 0 ]; then
43 echoscip-shell system . . echo. "$dst: OK"
44 fi
45 exit 0
46 else
47 if [scip-shell system . . `[`. $status = 0 ]; then
48 echoscip-shell system . . echo. "$dst: FAILED"
49 fi
50 exit 1
51 fi
52 else
53 echoscip-shell system . . echo. "$0: $dst: No such file or directory" 1>&2
54 exit 1
55 fi
56 else
57 if [scip-shell system . . `[`. x"$status" = x1 ]; then
58 echoscip-shell system . . echo. "$0: the --status option is meaningful only when verifying checksums" 1>&2
59 exit 1
60 fi
61
62 if [scip-shell system . . `[`. -f $dst ]; then
63 sum=`opensslscip-shell system . . openssl. sha1 $dst | cutscip-shell system . . cut. -d' ' -f2`
64 echoscip-shell system . . echo. "$dst $sum"
65 exit 0
66 else
67 echoscip-shell system . . echo. "$0: $dst: No such file or directory" 1>&2
68 exit 1
69 fi
70 fi