summaryrefslogtreecommitdiffstats
path: root/util/bin/make-data-url
diff options
context:
space:
mode:
Diffstat (limited to 'util/bin/make-data-url')
-rwxr-xr-xutil/bin/make-data-url7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/bin/make-data-url b/util/bin/make-data-url
new file mode 100755
index 00000000..a9d014e6
--- /dev/null
+++ b/util/bin/make-data-url
@@ -0,0 +1,7 @@
+#! /bin/sh
+set -euf
+for path; do
+ type="`file -bi "$path"`"
+ data="`base64 -w 0 "$path"`"
+ echo "data:$type;base64,$data"
+done