aboutsummaryrefslogtreecommitdiff
path: root/captain/captain.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-04-28 08:54:49 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2022-04-28 08:54:49 -0400
commite7aaa0256420e8d30dee54e603af60d54434c38e (patch)
tree908e5d435ea036f8382ed23d7cf30f1c16b04a46 /captain/captain.f90
parent6ae21577802462f38d98dd0e5415166008b1b13f (diff)
downloadlevitating-e7aaa0256420e8d30dee54e603af60d54434c38e.tar.gz
levitating-e7aaa0256420e8d30dee54e603af60d54434c38e.zip
Added module to generate uuids by calling uuidgen utility
Diffstat (limited to 'captain/captain.f90')
-rw-r--r--captain/captain.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/captain/captain.f90 b/captain/captain.f90
index 6713a9e..46287d9 100644
--- a/captain/captain.f90
+++ b/captain/captain.f90
@@ -82,6 +82,7 @@ contains
subroutine parse_options
use config
use m_crypt
+ use m_uuid, only: generate_uuid4
use captain_db, only: new_admin_db
implicit none
@@ -122,6 +123,18 @@ contains
Print *, "Unverify: "//trim(option)//"X", verify_hash(trim(option)//"X", tmp)
stop
+ ! This option also shouldn't be public, and it verifies that
+ ! uuids can be generated
+ else if(trim(option) == "--uuid") then
+ if(.not. config_loaded) then
+ ! Look up a directory for temp files - needed below
+ call get_environment_variable("TEMP", temp_dir)
+ end if
+
+ option = generate_uuid4()
+ print *, trim(option)
+ stop
+
else if(trim(option) == "--new-admin") then
! Config better be loaded by now...