adding verify command

This commit is contained in:
Lamar Daughma 2021-11-24 15:49:00 +00:00
parent f8abcd756b
commit 7b76dabe7b
1 changed files with 36 additions and 1 deletions

37
yadm
View File

@ -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() {