aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/confmk.py13
-rw-r--r--scripts/databaseclean.sql3
-rw-r--r--scripts/databaseinit.sql11
3 files changed, 10 insertions, 17 deletions
diff --git a/scripts/confmk.py b/scripts/confmk.py
index b8a1e6c..3a59510 100755
--- a/scripts/confmk.py
+++ b/scripts/confmk.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
+import re
from conf import conf
def gen_confmk():
@@ -11,12 +12,12 @@ def gen_confmk():
with open(conf.dot_confmk, 'w') as f:
f.write("# This file is generated. Please don't edit this file.\n")
- f.write("ARCH := " + conf.ARCH + "\n")
- f.write("\n")
- f.write("BUILDROOT_INITRAM := " + conf.buildroot_initram + "\n")
- f.write("BUILDROOT_INITTAB_DIRECTIVE := " + conf.buildroot_inittab_directive + "\n")
- f.write("BUILDROOT_INITSCRIPT := " + conf.buildroot_initscript + "\n")
- f.write("BUILDROOT_DEF_CONFIG := " + conf.buildroot_def_config + "\n")
+ for var in dir(conf):
+ if not re.match('__.*__', var):
+ val = eval('conf.' + var)
+ if type(val) is str:
+ f.write("CONF_" + var.upper() + " := ")
+ f.write(val + '\n')
#################################################################################
diff --git a/scripts/databaseclean.sql b/scripts/databaseclean.sql
new file mode 100644
index 0000000..0eb3193
--- /dev/null
+++ b/scripts/databaseclean.sql
@@ -0,0 +1,3 @@
+DROP TABLE IF EXISTS measure;
+DROP TABLE IF EXISTS configurations;
+DROP TABLE IF EXISTS toolsgit;
diff --git a/scripts/databaseinit.sql b/scripts/databaseinit.sql
index 95702fb..eee51fa 100644
--- a/scripts/databaseinit.sql
+++ b/scripts/databaseinit.sql
@@ -1,14 +1,3 @@
---
--- Drop all tables
---
-DROP TABLE IF EXISTS measure;
-DROP TABLE IF EXISTS configurations;
-DROP TABLE IF EXISTS toolsgit;
-
---
--- Initialize database
---
-
-- In this table are tracked versions of tools in git
CREATE TABLE toolsgit (
id BIGSERIAL PRIMARY KEY, -- Id