tinycm diff index.cgi @ rev 11

Improve Makefile and small fix
author Christophe Lincoln <pankso@slitaz.org>
date Sun Dec 22 02:36:28 2013 +0100 (2013-12-22)
parents 9d0f7be12384
children b7629d639756
line diff
     1.1 --- a/index.cgi	Sun Apr 22 10:49:23 2012 +0100
     1.2 +++ b/index.cgi	Sun Dec 22 02:36:28 2013 +0100
     1.3 @@ -103,11 +103,11 @@
     1.4  
     1.5  # Default index if missing
     1.6  default_index() {
     1.7 -	mkdir -p $(dirname $index)
     1.8 +	mkdir -p "$wiki"
     1.9  	cat > $wiki/$index.txt << EOT
    1.10  ==== Welcome ====
    1.11  
    1.12 -This is the default index page of your CM, you can start to edit adding
    1.13 +This is the default index page of your CM, you can start to edit and adding
    1.14  some content to your TinyCM.
    1.15  
    1.16  EOT
    1.17 @@ -585,7 +585,9 @@
    1.18  		html_header
    1.19  		user_box
    1.20  		get_lang
    1.21 -		[ ! -f "$wiki/$index.txt" ] && default_index
    1.22 +		if [ ! -f "$wiki/$index.txt" ]; then
    1.23 +			default_index
    1.24 +		fi
    1.25  		if [ ! -f "$wiki/$d.txt" ]; then
    1.26  			echo "<h2>$d</h2>"
    1.27  			gettext "The document does not exist. You can create it or read the"