wrapper script fix: XSL is in .deb package gzipped v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Wed, 08 Jan 2014 20:08:53 +0100
branchv_0
changeset 150 911b2d55bb08
parent 149 6a6f7b384591
child 151 21eb46c5e2ec
wrapper script fix: XSL is in .deb package gzipped
scripts/sql-dk.sh
--- a/scripts/sql-dk.sh	Wed Jan 08 19:59:19 2014 +0100
+++ b/scripts/sql-dk.sh	Wed Jan 08 20:08:53 2014 +0100
@@ -2,15 +2,16 @@
 
 # include user-defined overrides and customization
 if [ -f ~/.sql-dk/environment.sh ]; then # .sql-dk must match with DIR in Constants.java
-    . ~/.sql-dk/environment.sh
+	. ~/.sql-dk/environment.sh
+else
+	mkdir -p ~/.sql-dk/
+	touch ~/.sql-dk/environment.sh
+	# link/copy support files for configuration:
+	[ -f ~/.sql-dk/config.xsd ] || ln -s /usr/share/doc/sql-dk/config.xsd ~/.sql-dk/config.xsd
+	[ -f ~/.sql-dk/config.rnc ] || ln -s /usr/share/doc/sql-dk/config.rnc ~/.sql-dk/config.rnc
+	[ -f ~/.sql-dk/config.xsl ] || gunzip < /usr/share/doc/sql-dk/config.xsl.gz > ~/.sql-dk/config.xsl # might not work in www browser if just symlinked
 fi
 
-# link/copy support files for configuration
-[ -f ~/.sql-dk/config.xsd ] || ln -s /usr/share/doc/sql-dk/config.xsd ~/.sql-dk/config.xsd
-[ -f ~/.sql-dk/config.rnc ] || ln -s /usr/share/doc/sql-dk/config.rnc ~/.sql-dk/config.rnc
-[ -f ~/.sql-dk/config.xsl ] || cp /usr/share/doc/sql-dk/config.xsl ~/.sql-dk/config.xsl # might not work in www browser if just symlinked
-
-
 # Standard JDBC drivers
 [ -n "$STANDARD_JDBC" ] || STANDARD_JDBC=(
 	"/usr/share/java/postgresql-jdbc4.jar"