+if [[ "x$PAGESDIRECTORY" != "x" ]]; then
+ if [ ! -d $PAGESDIRECTORY ]; then
+ mkdir -p $PAGESDIRECTORY
+ fi
+
+ if [ ! -w $PAGESDIRECTORY ]; then
+ $ECHOCOMMAND "Can't write to $PAGESDIRECTORY directory, exiting"
+ exit 16
+ fi
+ UNIXPAGESDIRECTORY=$PAGESDIRECTORY/
+ PAGESDIRECTORY=$(bpgallery_escape_url $PAGESDIRECTORY)/
+
+ BASEURL="../"
+else
+ BASEURL=""
+ UNIXPAGESDIRECTORY=""
+fi
+