diff options
| author | Bdale Garbee <bdale@gag.com> | 2016-07-04 23:47:24 +0200 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2016-07-04 23:47:24 +0200 | 
| commit | 2e26d1ab42163988dc26b06b016c3b05efe17659 (patch) | |
| tree | 5736db47fa979abb0e37b0fc3b956cd6cdbe9405 /doc/install-html | |
| parent | 639e461ded29a48c155afea12171cbfc191ccfd7 (diff) | |
| parent | 65ed2f588ca596fe9aa559bebd590a2a11b9859b (diff) | |
Merge branch 'master' into branch-1.6
Diffstat (limited to 'doc/install-html')
| -rwxr-xr-x | doc/install-html | 32 | 
1 files changed, 32 insertions, 0 deletions
| diff --git a/doc/install-html b/doc/install-html new file mode 100755 index 00000000..71c7933c --- /dev/null +++ b/doc/install-html @@ -0,0 +1,32 @@ +#!/bin/sh +destination= +state=arg +for file in "$@"; do +    case $state in +	arg) +	    case $file in +		-d) +		    state=destination +		    ;; +		*) +		    base=`basename $file` +		    case "$destination" in +			"") +			    echo "Need -d destination option before files" 1>&2 +			    exit 1 +			    ;; +			*) +			    sed \ +				-e 's/<[?]xml [^>]*>//' \ +				-e 's/<!DOCTYPE [^>]*>//' "$file" > "$destination/$base" +			    ;; +		    esac +		    ;; +	    esac +	    ;; +	destination) +	    destination=$file +	    state=arg +	    ;; +    esac +done | 
