summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/maintenance-tools/parabola-keys9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/maintenance-tools/parabola-keys b/src/maintenance-tools/parabola-keys
index 45ebe22..76aa221 100755
--- a/src/maintenance-tools/parabola-keys
+++ b/src/maintenance-tools/parabola-keys
@@ -4,7 +4,8 @@ readonly KEYS_FILE=/usr/share/pacman/keyrings/parabola-trusted
readonly WARNING_N_DAYS=30
readonly AUTOBUILDER_KEY='D3EAD7F9D076EB9AF650149DA170D6A0B669E21A'
-readonly SHOULD_SHOW_ALL=$( [[ "$1" == '--all' ]] && echo 1 || echo 0 )
+readonly SHOULD_SHOW_ALL=$( [[ "$1" == '--all' ]] && echo 1 || echo 0 )
+readonly CHROOT=$( [[ "$1" == '--chroot' ]] && echo $2 )
readonly KEYS=$(cat $KEYS_FILE)
readonly JOIN_CHAR='~'
# readonly EMAIL_REGEX='.*key \([^ ,]*\), .*'
@@ -47,6 +48,12 @@ IsRevoked() # (key_data)
echo $1 | grep -E '(revoked)' > /dev/null
}
+# run in chroot
+if [[ -d "$CHROOT" ]]
+then sudo cp ${BASH_SOURCE} $CHROOT/
+ sudo chroot $CHROOT/ ./$(basename ${BASH_SOURCE})
+ exit
+fi
# collect results
echo -n "($(echo $KEYS | wc -w)) keys to consider "