Debug
This commit is contained in:
parent
91cb075a19
commit
a31149727b
1 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,7 @@ wai=$(dirname $(readlink -f "$0")) # Current script directory
|
|||
public=${wai}/public
|
||||
projects=${wai}/projects
|
||||
template=${wai}/template.html
|
||||
main="projectile"
|
||||
|
||||
# Clean before
|
||||
rm -rf $public/projects
|
||||
|
@ -16,9 +17,10 @@ build_links() {
|
|||
for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d)
|
||||
do
|
||||
name=$(basename $p)
|
||||
[ "$name" == "$main" ] && link="./index.html" || link=${name}.html
|
||||
[ $name == $1 ] && active="active" || active=""
|
||||
|
||||
links="${links}\n"'<a href="'${name}'.html" class="btn btn-primary '$active'">'${name}'</a>'
|
||||
links="${links}\n"'<a href="'$link'" class="btn btn-primary '$active'">'${name}'</a>'
|
||||
done
|
||||
tmp=$(mktemp)
|
||||
echo -e "$links" > $tmp
|
||||
|
@ -28,7 +30,7 @@ build_links() {
|
|||
for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d)
|
||||
do
|
||||
name=$(basename $p)
|
||||
html=${public}/${name}.html
|
||||
[ "$name" == "$main" ] && html=${public}/index.html || html=${public}/${name}.html
|
||||
js=./projects/$name/index.js
|
||||
content=$p/index.html
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue