summaryrefslogtreecommitdiff
path: root/write_exports_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'write_exports_init.sh')
-rwxr-xr-xwrite_exports_init.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/write_exports_init.sh b/write_exports_init.sh
new file mode 100755
index 0000000..d434e94
--- /dev/null
+++ b/write_exports_init.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# This file is part of Haketilo
+#
+# Copyright (C) 2021, Wojtek Kosior
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the CC0 1.0 Universal License as published by
+# the Creative Commons Corporation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# CC0 1.0 Universal License for more details.
+
+set -e
+
+BROWSER="$1"
+BUILDDIR="$2"
+SETTINGS="$3"
+
+if [ "chromium" = "$BROWSER" ]; then
+ cp CHROMIUM_exports_init.js "$BUILDDIR"/exports_init.js
+else
+ cp MOZILLA_exports_init.js "$BUILDDIR"/exports_init.js
+fi
+
+printf 'window.haketilo_exports.initial_data = %s;\n' "$(cat "$SETTINGS")" \
+ >> "$BUILDDIR"/exports_init.js
old-service-types'....Ludovic Courtès 2017-09-16services: Add a description and location for each service type....Ludovic Courtès 2017-07-11services: Make error message less scary....Ludovic Courtès 2017-05-03ui: Rename '_' to 'G_'....Ludovic Courtès 2017-04-16services: Service types can now specify a default value for instances....Ludovic Courtès 2017-04-16services: 'service-parameters' becomes 'service-value'....Ludovic Courtès 2017-04-13services: Define '%linux-bare-metal-service' using 'simple-service'....Ludovic Courtès 2017-03-10services: Create /var/log upon activation....Christopher Baines 2017-02-08services: Add 'special-files-service-type'....Ludovic Courtès 2017-01-24services: Create /var/log/wtmp upon activation....Ludovic Courtès 2017-01-19services: Create /var/run/utmpx upon activation....Ludovic Courtès 2017-01-16services: Export 'service-extension' procedures....Christopher Baines 2016-12-11services: Activate system prior to services....Christopher Baines 2016-09-20services: Use 'source-module-closure' for (gnu build activation)....Ludovic Courtès 2016-09-19services: Add 'simple-service'....Ludovic Courtès 2016-07-12gnu: Use 'gexp->file' in conjunction with 'with-imported-modules'....Ludovic Courtès 2016-07-12gnu: Switch to 'with-imported-modules'....Ludovic Courtès 2016-06-20services: Add 'gc-root-service-type'....Ludovic Courtès 2016-03-15doc: Clarify and consolidate modify-services documentation....Chris Marusich 2016-03-07services: Use 'packages->manifest' in 'packages->profile-entry'....宋文武 2016-02-08file-systems: Spawn a Bournish REPL upon fsck failure....Ludovic Courtès 2016-02-03services: 'file-union' makes sure each source file exists....Ludovic Courtès 2016-01-29services: Rename 'dmd' services to 'shepherd'....Alex Kost