aboutsummaryrefslogtreecommitdiff
path: root/process_html_file.sh
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-12-22 16:39:34 +0100
committerWojtek Kosior <koszko@koszko.org>2021-12-22 16:39:34 +0100
commitb590eaa2f64ead3384eadc6fe58f6358aa1a0478 (patch)
tree8f1e9403c1a75246c2a9a0afc4ab30706ea7afbe /process_html_file.sh
parentb7378a9994724750198e0d165c575be8538334fb (diff)
downloadbrowser-extension-b590eaa2f64ead3384eadc6fe58f6358aa1a0478.tar.gz
browser-extension-b590eaa2f64ead3384eadc6fe58f6358aa1a0478.zip
reworked build system; added missing license notices
Diffstat (limited to 'process_html_file.sh')
-rwxr-xr-xprocess_html_file.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/process_html_file.sh b/process_html_file.sh
deleted file mode 100755
index 1275b3e..0000000
--- a/process_html_file.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/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.
-
-# Call like:
-# ./process_html_file.sh html/options.html
-
-. ./shell_utils.sh
-
-FILE="$1"
-FILEKEY=$(sanitize "$FILE")
-
-if [ "x$(map_get HTML_FILENAMES $FILEKEY)" = "xyes" ]; then
- printf 'import loop on %s\n' "$FILE" >&2
- exit 1
-fi
-
-map_set_export HTML_FILENAMES $FILEKEY yes
-
-awk '\
-!/^[\t\r ]*<IMPORT[\t\r ]+([^\t\r ]+)[\t\r ]+\/>[\t\r ]*$/{
- print $0;
-}
-/^[\t\r ]*<IMPORT[\t\r ]+([^\t\r ]+)[\t\r ]+\/>[\t\r ]*$/{
- indent = substr($0, 1, index($0, "<") - 1);
- command = "./process_html_file.sh " $2;
- while (command | getline) {
- print indent $0;
- }
- if (close(command) != 0)
- exit 1;
-}' < "$FILE"