Commit 0c851d8e authored by Leo Iannacone's avatar Leo Iannacone

add support for debomatic.architecture = system - use dpkg-architecture the get it

parent 5e000d58
......@@ -37,8 +37,8 @@ config.debomatic.jsonfile = "/var/log/debomatic-json.log"
Web template configuration
Title and description for the header
###
config.web.debomatic.architecture = "amd64"
config.web.title = "Deb-o-Matic " + config.web.debomatic.architecture
config.web.debomatic.architecture = "system" # or amd64, i386, ...
config.web.title = "Deb-o-Matic"
###
Admin email and name to show in the home page.
......@@ -164,6 +164,12 @@ try
crypto.createHash("sha256")
.update(config.debomatic.path)
.digest("hex")
if config.web.debomatic.architecture == "system"
check = "dpkg-architecture -qDEB_BUILD_ARCH"
require("child_process").exec check, (error, stdout, stderr) ->
config.web.debomatic.architecture = stdout.trim()
module.exports = config
catch err
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.png" />
<title><%= web.title %></title>
<title><%= web.title %> <%= web.debomatic.architecture %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0/css/bootstrap-theme.min.css">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment