Skip to content

Commit

Permalink
Remove GNU sed prerequisite
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinchou committed Jun 25, 2019
1 parent 4a6de89 commit ea5b147
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ will be faded away.
0. dot - graphviz version 2.41.20190308.1641 (20190308.1641)
* new versions should work, if not I will fix it
* lower versions may work, but not tested yet, I am lazy...
1. GNU sed, if you don't have one, modify the build script to fit the purpose

### usage

Expand Down
10 changes: 9 additions & 1 deletion build_call_graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ else
fi

# echo ${out}
which dot > /dev/null
if [ $? -ne 0 ]; then
echo "no graphviz dot found"
exit -1
fi

dot -Tsvg -o ${out} ${src} > /dev/null
sed -ri 's#</svg>##' ${out}

sed -i.bak 's#</svg>##' ${out}
rm -f ${out}.bak

cat "${attach}" >> ${out}
echo "</svg>" >> ${out}

0 comments on commit ea5b147

Please sign in to comment.