Le site arthur.bebou.netlib.re - retour accueil
git clone git://bebou.netlib.re/arthur.bebou
Log | Files | Refs |
common (397B)
1 #! /bin/sh 2 3 tmpd=$(mktemp -d) 4 trap "rm -rf $tmpd" EXIT 5 6 show() { lowdown --html-no-skiphtml --html-no-escapehtml $tmpd/$1; } 7 8 tsv2layout() { 9 cat > $tmpd/all 10 < $tmpd/all head -n1 | tr '\t' '\n' > $tmpd/vars 11 < $tmpd/all tail -n+2 | 12 while IFS= read line;do 13 eval $(echo "$line" | tr '\t' '\n' | paste -d '=' $tmpd/vars - | 14 sed -E 's/"/\\\"/g' | 15 sed -E 's/=/&"/;s/$/"/') 16 . "./$1" 17 done 18 }