Commit Diff
Diff:
a2acfcbc5771271c5e90fc5082a0617a673ce7ad
f397a9cc9afeada3f59f98d7d4caedcbac00222d
Commit:
f397a9cc9afeada3f59f98d7d4caedcbac00222d
Tree:
e0a9f33694e0ff88e95ec0fdba00641b3e7c607a
Author:
HucSte <devs@stephane-huc.net>
Committer:
HucSte <devs@stephane-huc.net>
Date:
Wed Oct 19 20:47:57 2016 UTC
Message:
AWK Corrections...
blob - bad4f98cfc106e76e70ef6724cc13cbf70f1dfde
blob + 221538a7a4a8b178ed3791b06ed63f240d29d032
--- snaps
+++ snaps
@@ -40,7 +40,7 @@
### VARS
###
-VERSION=1.0.1
+VERSION=1.0.1_hucste
RL=60 # signify var
MIRRORSOURCE=$(awk -F '=' '/^installpath/ { gsub(/ /,"",$2); print $2 }' /etc/pkg.conf)
@@ -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