Optimization: avoid using a temporary file to calculate the hash in md_handler.
This commit is contained in:
parent
e9a96d0e26
commit
e8cd9a1978
2 changed files with 4 additions and 2 deletions
|
|
@ -47,7 +47,7 @@ fn link_bar {
|
||||||
echo '</ul>'
|
echo '</ul>'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn md_handler { $formatter < $1 }
|
fn md_handler { $formatter $1 }
|
||||||
|
|
||||||
fn tpl_handler { template $* }
|
fn tpl_handler { template $* }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,10 @@ fn fltr_cache {
|
||||||
a=$f
|
a=$f
|
||||||
f=/dev/null
|
f=/dev/null
|
||||||
}
|
}
|
||||||
if not
|
if not {
|
||||||
score=`{sha1sum $f || exit 1}
|
score=`{sha1sum $f || exit 1}
|
||||||
|
score=$score(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cachedir=/tmp/fltr_cache/$score
|
cachedir=/tmp/fltr_cache/$score
|
||||||
mkdir -p $cachedir >[2]/dev/null
|
mkdir -p $cachedir >[2]/dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue