We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ca2b51 commit 776f0acCopy full SHA for 776f0ac
contrib/sign-profiles.sh
@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+
3
+PROFILE="$1"; shift
4
+PRIVATE_KEY="${1:-/etc/certs/private.key}"; shift
5
+OK=0
6
7
+HUBBLE="${HUBBLE:-hubble}"
8
9
+if [ -n "$PROFILE" -a -d "$PROFILE/hubblestack_pulsar" -a -d "$PROFILE/hubblestack_nova_profiles" ]
10
+then cd "$PROFILE" || exit 1; OK=1
11
+else read -ep "$PROFILE=\"$PROFILE\" doesn't look like profile repo, sign anyway? " YN
12
+ if [[ "$YN" =~ [Yy] ]]
13
+ then cd "$PROFILE" || exit 1; OK=1
14
+ fi
15
+fi
16
17
+if [ "X$OK" = X1 ]
18
+then readarray -t FILEZ < <( find ./ -name .git -prune -o \( -type f -print \) \
19
+ | grep -vE '^(MANIFEST|SIGNATURE)$' )
20
+ ( set -x -e;
21
+ cd "$PROFILE"
22
+ "$HUBBLE" -vvv signing.msign "${FILEZ[@]}" private_key="$PRIVATE_KEY"
23
+ )
24
+else "usage: $(basename "$0") profile-dir"
25
0 commit comments