diff options
Diffstat (limited to 'refresh.sh')
| -rwxr-xr-x | refresh.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -20,10 +20,11 @@ build_links() { for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d) do name=$(basename $p) + beautiful_name=$(cat $p/name.txt) [ "$name" == "$main" ] && link="./index.html" || link=${name}.html [ $name == $1 ] && active="active" || active="" - links="${links}\n"'<a href="'$link'" class="btn btn-primary '$active'">'${name}'</a>' + links="${links}\n"'<a href="'$link'" class="btn btn-primary '$active'">'${beautiful_name}'</a>' done tmp=$(mktemp) echo -e "$links" > $tmp @@ -36,12 +37,14 @@ do [ "$name" == "$main" ] && html=${public}/index.html || html=${public}/${name}.html js=./projects/$name/index.js content=$p/index.html + beautiful_name=$(cat $p/name.txt) # Create HTML page cp -r $p $public/projects/ cat $template |sed "/\${CONTENT}/r $content"|sed '/\${CONTENT}/d' > $html sed -i "s#\${JS}#${js}#g" $html sed -i "s#\${project_name}#${name}#g" $html + sed -i "s#\${beautiful_name}#${beautiful_name}#g" $html echo $html # Create links |
