Commit Diff
Diff:
a2acfcbc5771271c5e90fc5082a0617a673ce7ad
211b7e0b969c0cb43a53a35191385e107f0bb147
Commit:
211b7e0b969c0cb43a53a35191385e107f0bb147
Tree:
b5b1a972544fe9b89d3088ee40f0c4b3088327e7
Author:
Fred. Galusik <f@galusik.xyz>
Committer:
Fred. Galusik <f@galusik.xyz>
Date:
Thu Oct 20 17:02:23 2016 UTC
Message:
Merge branch 'master' into 'master' Some code cleanup, thanks to Stephane HUC See merge request !5
blob - bad4f98cfc106e76e70ef6724cc13cbf70f1dfde
blob + bc863674ee1812c02cd6e1ea4d85835f908ee516
--- snaps
+++ snaps
@@ -80,7 +80,7 @@ toupgrade() {
rm -f $LASTSNAPS
fi
$GET -V -o "$LASTSNAPS" "$REMOTESNAPS"
- REMOTEVERSION=$(grep "^VERSION=" $LASTSNAPS | cut -d'=' -f2)
+ REMOTEVERSION=$(awk -F '=' '/^VERSION=/ { print $2 }' "$LASTSNAPS")
if [ $? -eq 0 ]; then
@@ -160,14 +160,14 @@ s_check() {
echo "Sign key: $SIGNPUB"
OK=OK
# signify
- if [[ $(signify -C -p $SIGNPUB -x $SIGF $BSDRD 2>&1 | grep OK | awk '{print $2}') = $OK ]]; then
+ if [[ $(signify -C -p $SIGNPUB -x $SIGF $BSDRD | awk '/'$BSDRD'/ {print $2}') = $OK ]]; then
echo "==> GOOD: $SHAF file is coming from OpenBSD"
else
echo "==> WARNING: $SHAF is not coming from OpenBSD, aborting!!"
exit 1
fi
# sha256
- if [[ $(sha256 -c $SHAF 2>&1 | grep OK | awk '{print $3}') = $OK ]]; then
+ if [[ $(sha256 -c $SHAF 2>&1 | awk '/'$BSDRD'/ {print $3}') = $OK ]]; then
echo "==> GOOD: bsd.rd integrity checked"
else
echo "==> WARNING: bsd.rd seems corrupted, aborting!!"
Frédéric Galusik