Skip to content
This repository
Browse code

docs: fix build on OS X (BSD sed is a bit different than on Linux)

  • Loading branch information...
commit ce03cda978573746859d3ef4b696eb2d47596b3a 1 parent 404a366
Marc Worrell mworrell authored

Showing 2 changed files with 10 additions and 5 deletions. Show diff stats Hide diff stats

  1. +4 3 doc/ref/tags/.get_tags
  2. +6 2 doc/ref/templates/.generate
7 doc/ref/tags/.get_tags
... ... @@ -1,6 +1,5 @@
1 1 #!/bin/sh
2   -exec sed -f - -- "$@" <<'EOF'
3   -
  2 +echo <<EOF
4 3 # operate on the first lines of the identifier_to_keyword fun
5 4 # that mentions open_tag (guard clause), and down until the
6 5 # the line containing "Type ="
@@ -24,4 +23,6 @@ exec sed -f - -- "$@" <<'EOF'
24 23
25 24 # delete everything else
26 25 d
27   -EOF
  26 +EOF > /tmp/ztgsed$$
  27 +exec sed -f /tmp/ztgsed$$ -- "$@"
  28 +# rm /tmp/ztgsed$$
8 doc/ref/templates/.generate
@@ -3,8 +3,12 @@
3 3 # /path/to/zotonic/modules/<mod>/templates/{device/}template_name.tpl
4 4 for f in `find $ZOTONIC_SRC/modules -name [^_]\*.tpl`
5 5 do
6   - read -r mod template device <<EOF
7   -`echo $f | sed -e 's,.*/\(mod_[^/]*\)/templates/\(\([^/]*\)/\|\)\(.*\).tpl,\1 \4 \3,'`
  6 + read -r mod templatepath <<EOF
  7 +`echo $f | sed -e 's/^.*\/\(mod_[^\/]*\)\/templates\/\(.*\)\.tpl$/\1 \2/'`
  8 +EOF
  9 + template=`basename $templatepath`
  10 + read -r device <<EOF
  11 +`dirname $templatepath | sed -e 's/^\.$//'`
8 12 EOF
9 13 dir=${0%/*}
10 14 base=$template${device:+-}$device

1 comment on commit ce03cda

Andreas Stenius

guess you commented the rm during debugging... ?

Andreas Stenius
Owner
kaos commented on ce03cda

My head hurts just from looking at that... and I was the one who wrote it in the first place :p

Marc Worrell

indeed, I will put it back :+1:

Please sign in to comment.
Something went wrong with that request. Please try again.