-
Notifications
You must be signed in to change notification settings - Fork 1
/
check-sig.sh
executable file
·67 lines (62 loc) · 1.25 KB
/
check-sig.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
while test $# -gt 0; do
case "$1" in
-h|help)
echo ""
echo "Checks for the existence of a signature for all files in the current directory."
echo "-------------------------------------------------------------------------------"
echo "Usage:"
echo " ./check-sig [mac | rpm | deb]"
exit 0
;;
-a|--all)
C_ALL='true'
shift
;;
-r|--runtime)
C_RUNTIME='true'
C_ALL='false'
shift
;;
-s|--sdk)
C_SDK='true'
C_ALL='false'
shift
;;
-t|--test)
TESTMODE='true'
shift
;;
-v|--version)
shift
C_VERSION=$1
shift
;;
*)
echo "Undefined parameter."
break
;;
esac
done
case "$1" in
mac)
for f in *.pkg
do
echo "Checking "$f "..."
pkgutil --check-signature $f
done
;;
rpm)
for f in *.rpm
do
echo "Checking "$f "..."
rpm -K $f
done
;;
deb)
for f in *.deb
do
echo "Checking "$f "..."
dpkg-sig -c $f
done
;;
esac