summaryrefslogtreecommitdiff
path: root/distrib/miniroot/makehash.sh
blob: 87fd4e89d0882b1ca8d114c16434f7e5c57cffbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

dir=$1
rev=$2

if [ $# -lt 3 ]; then
	echo makehash.sh: No RELEASEDIR -- skipping hash storage
	exit 0
fi

rel=$3

#echo makehash args $dir $rev $rel

for i in bsd bsd.mp; do
	if [ -f $rel/$i ]; then
		cat $rel/$i | sum -a sha256 > $dir/$i
		#ls -alF $rel/$i
		#echo $i `cat $dir/$i`
	fi
done

if [ $# -gt 3 ]; then
	shift; shift; shift;
	for i in $*; do
		cat $rel/$i | sum -a sha256 > $dir/$i
		#ls -alF $rel/$i
		#echo $i `cat $dir/$i`
	done
fi

for i in base comp etc misc man game ; do
	cat $rel/$i$rev.tgz | sum -a sha256 > $dir/$i$rev.tgz
	#ls -alF $rel/$i$rev.tgz
	#echo $i$rev.tgz `cat $dir/$i$rev.tgz`
done