From 7b76dabe7b409600c40f569db3496026596c0e99 Mon Sep 17 00:00:00 2001 From: Lamar Daughma Date: Wed, 24 Nov 2021 15:49:00 +0000 Subject: [PATCH] adding verify command --- yadm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/yadm b/yadm index 832d6c9..853ce2e 100755 --- a/yadm +++ b/yadm @@ -99,7 +99,7 @@ function main() { # parse command line arguments local retval=0 - internal_commands="^(alt|bootstrap|clean|clone|config|decrypt|encrypt|enter|git-crypt|help|--help|init|introspect|list|perms|transcrypt|upgrade|version|--version)$" + internal_commands="^(alt|bootstrap|clean|clone|config|decrypt|encrypt|enter|git-crypt|help|--help|init|introspect|list|perms|transcrypt|upgrade|version|verify|--version)$" if [ -z "$*" ] ; then # no argumnts will result in help() help @@ -1400,6 +1400,41 @@ function version() { } +function verify() { + #verify internal yadm variables + local local_class + local local_system + local local_host + local local_user + local local_distro + set_local_alt_values + + while [[ $# -gt 0 ]] ; do + case "$1" in + -o|--os) + echo "$local_system" + ;; + -d|--distro) + echo "$local_distro" + ;; + -u|--user) + echo "$local_user" + ;; + -h|--host) + echo "$local_host" + ;; + -c|--class) + echo "$local_class" + ;; + *) + #do nothing. + ;; + esac + shift + done + +} + # ****** Utility Functions ****** function exclude_encrypted() {