mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
adding verify command
This commit is contained in:
parent
f8abcd756b
commit
7b76dabe7b
37
yadm
37
yadm
@ -99,7 +99,7 @@ function main() {
|
|||||||
|
|
||||||
# parse command line arguments
|
# parse command line arguments
|
||||||
local retval=0
|
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
|
if [ -z "$*" ] ; then
|
||||||
# no argumnts will result in help()
|
# no argumnts will result in help()
|
||||||
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 ******
|
# ****** Utility Functions ******
|
||||||
|
|
||||||
function exclude_encrypted() {
|
function exclude_encrypted() {
|
||||||
|
Loading…
Reference in New Issue
Block a user