Updateé
This commit is contained in:
parent
2c497e142d
commit
f963af5e13
2 changed files with 5 additions and 5 deletions
|
@ -1 +0,0 @@
|
||||||
Hello world!
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
wai=$(dirname $(readlink -f "$0")) # Current script directory
|
wai=$(dirname $(readlink -f "$0")) # Current script directory
|
||||||
projects_dir=${wai}/projects
|
projects_dir=${wai}/projects
|
||||||
www_dir=${wai}/public
|
www_dir=${wai}/public/
|
||||||
projects_out_dir=${www_dir}/projects/
|
projects_out_dir=${www_dir}/projects/
|
||||||
template_file=${wai}/template.html
|
template_file=${wai}/template.html
|
||||||
|
|
||||||
|
@ -31,13 +31,14 @@ do
|
||||||
name=$(basename $p)
|
name=$(basename $p)
|
||||||
html=$projects_out_dir/$name/index.html
|
html=$projects_out_dir/$name/index.html
|
||||||
js=$projects_out_dir/$name/index.js
|
js=$projects_out_dir/$name/index.js
|
||||||
|
js2=projects/$name/index.js
|
||||||
page=${www_dir}/${name}.html
|
page=${www_dir}/${name}.html
|
||||||
|
|
||||||
# Create html
|
|
||||||
echo $p
|
echo $p
|
||||||
|
# Create html
|
||||||
|
echo $projects_out_dir
|
||||||
cp -r $p $projects_out_dir/
|
cp -r $p $projects_out_dir/
|
||||||
cat $template_file |sed "/\${CONTENT}/r $html"|sed '/\${CONTENT}/d' > $page
|
cat $template_file |sed "/\${CONTENT}/r $html"|sed '/\${CONTENT}/d' > $page
|
||||||
sed -i "s#\${JS}#${js}#g" $page
|
sed -i "s#\${JS}#${js2}#g" $page
|
||||||
sed -i "s#\${project_name}#${name}#g" $page
|
sed -i "s#\${project_name}#${name}#g" $page
|
||||||
|
|
||||||
# Add links
|
# Add links
|
||||||
|
|
Loading…
Add table
Reference in a new issue