aboutsummaryrefslogtreecommitdiff
path: root/hwrap
diff options
context:
space:
mode:
Diffstat (limited to 'hwrap')
-rwxr-xr-xhwrap21
1 files changed, 21 insertions, 0 deletions
diff --git a/hwrap b/hwrap
new file mode 100755
index 0000000..7dcfae0
--- /dev/null
+++ b/hwrap
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# hwrap -- wrap in <html> tag
+
+l=
+while getopts l: o; do
+ case $o in
+ l) l=$OPTARG ;;
+ ?) echo usage: $0 [-l LANG] 1>&2; exit 1 ;;
+ esac
+done
+shift $((OPTIND-1))
+
+if test -z "$l"
+then echo '<html>'
+else echo "<html lang=\"$l\">"
+fi
+
+cat
+
+echo '</html>'