aboutsummaryrefslogtreecommitdiffstats
path: root/testing/aaudit/aaudit-repo-update
diff options
context:
space:
mode:
Diffstat (limited to 'testing/aaudit/aaudit-repo-update')
-rwxr-xr-xtesting/aaudit/aaudit-repo-update25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/aaudit/aaudit-repo-update b/testing/aaudit/aaudit-repo-update
new file mode 100755
index 0000000000..3aa4cc5854
--- /dev/null
+++ b/testing/aaudit/aaudit-repo-update
@@ -0,0 +1,25 @@
+#!/usr/bin/lua5.2
+
+local posix = require 'posix'
+local aaudit = require 'aaudit'
+
+local function usage()
+ print("usage: aaudit-repo-update [-i COMMIT_IDENTITY] [-m COMMIT_MESSAGE]")
+ os.exit(1)
+end
+
+local C = { }
+local address
+for ret, optval in posix.getopt(arg, 'a:i:m:') do
+ if ret == 'a' then
+ address = optval
+ elseif ret == 'i' then
+ C.identity = optval
+ elseif ret == 'm' then
+ C.message = optval
+ else
+ usage()
+ end
+end
+
+aaudit.import_commit(aaudit.repohome(address), C)