Mercurial > repos > jjohnson > defuse
diff make_html.sh @ 45:aedaa66483f1 draft
Uploaded
author | jjohnson |
---|---|
date | Wed, 18 Oct 2017 16:55:57 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make_html.sh Wed Oct 18 16:55:57 2017 -0400 @@ -0,0 +1,18 @@ +#!/bin/bash +## create html with links for output_dir +## usage: make_html.sh dataset_path dataset_extra_file_path +defuse_out=$1 +extra_files_path=$2 +if [ -e $defuse_out ] +then + echo '<html><head><title>Defuse Output</title></head><body>' > $defuse_out + echo '<h2>Defuse Output Files</h2><ul>' >> $defuse_out + pushd $extra_files_path + for f in `find -L . -maxdepth 1 -type f`; + do fn=`basename ${f}`; echo '<li><a href="'${fn}'">'${fn}'</a></li>' >> $defuse_out; + done + popd + echo '</ul>' >> $defuse_out + echo '</body></html>' >> $defuse_out +fi +