Commits

Arjan Scherpenisse committed 31256d2

Tweaks to addsite, INSTALL

Comments (0)

Files changed (2)

 
 3. Install PostgreSQL (preferably 8.3 or newer).
 
-4. Obtain a copy of the Zotonic source code.
+4. Enable trust-authentication (username+password) in postgres.
+
+5. Obtain a copy of the Zotonic source code.
 
 
 

src/scripts/zotonic-addsite

      # Copy the default site as a template
     cp -pR $SKELDIR $SITES/$SITE
 
+    pushd .
     cd $SITES/$SITE
 
     # Remove placeholder .empty files
     done
     sed -i -e "$seds" $SITE.erl config
 
+    popd
+
     # Make the new site
     make -C $ZOTONIC
 
         usage
     fi
 
+    # allow %%SITE%% syntax in db name and schema
+    DBDATABASE=`echo $DBDATABASE|sed "s/%%SITE%%/$SITE/g"`
+    DBSCHEMA=`echo $DBSCHEMA|sed "s/%%SITE%%/$SITE/g"`
+
     if [ -e $SITES/$SITE ]; then
 	    echo `basename $0`: cannot add site "\`$SITE'": $SITES/$SITE already exists 1>&2
         exit 1