Skip to content
Browse files

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

  • Loading branch information...
1 parent 404a366 commit ce03cda978573746859d3ef4b696eb2d47596b3a @mworrell mworrell committed Mar 22, 2013
Showing with 10 additions and 5 deletions.
  1. +4 −3 doc/ref/tags/.get_tags
  2. +6 −2 doc/ref/templates/.generate
View
7 doc/ref/tags/.get_tags
@@ -1,6 +1,5 @@
#!/bin/sh
-exec sed -f - -- "$@" <<'EOF'
-
+echo <<EOF
# operate on the first lines of the identifier_to_keyword fun
# that mentions open_tag (guard clause), and down until the
# the line containing "Type ="
@@ -24,4 +23,6 @@ exec sed -f - -- "$@" <<'EOF'
# delete everything else
d
-EOF
+EOF > /tmp/ztgsed$$
+exec sed -f /tmp/ztgsed$$ -- "$@"
+# rm /tmp/ztgsed$$
@kaos
Zotonic member
kaos added a note Mar 22, 2013

guess you commented the rm during debugging... ?

@mworrell
Zotonic member
mworrell added a note Mar 22, 2013

indeed, I will put it back 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
8 doc/ref/templates/.generate
@@ -3,8 +3,12 @@
# /path/to/zotonic/modules/<mod>/templates/{device/}template_name.tpl
for f in `find $ZOTONIC_SRC/modules -name [^_]\*.tpl`
do
- read -r mod template device <<EOF
-`echo $f | sed -e 's,.*/\(mod_[^/]*\)/templates/\(\([^/]*\)/\|\)\(.*\).tpl,\1 \4 \3,'`
+ read -r mod templatepath <<EOF
+`echo $f | sed -e 's/^.*\/\(mod_[^\/]*\)\/templates\/\(.*\)\.tpl$/\1 \2/'`
+EOF
+ template=`basename $templatepath`
+ read -r device <<EOF
+`dirname $templatepath | sed -e 's/^\.$//'`
EOF
dir=${0%/*}
base=$template${device:+-}$device

1 comment on commit ce03cda

@kaos
Zotonic member
kaos commented on ce03cda Mar 22, 2013

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

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