[Fusionforge-commits] r14503 - in trunk: . src/install
Roland Mas
lolando at fusionforge.org
Thu Sep 29 16:04:26 CEST 2011
Author: lolando
Date: 2011-09-29 16:04:26 +0200 (Thu, 29 Sep 2011)
New Revision: 14503
Modified:
trunk/
trunk/src/install/install3
Log:
Portability fixes
Modified: trunk/src/install/install3
===================================================================
--- trunk/src/install/install3 2011-09-29 13:50:16 UTC (rev 14502)
+++ trunk/src/install/install3 2011-09-29 14:04:26 UTC (rev 14503)
@@ -262,14 +262,23 @@
then
susufix=''
else
- susufix='-'
+ susufix='- -s /bin/sh'
fi
msg green " * Creating $gforge_db Database..."
su $susufix $gforge_user -c "createdb --encoding UNICODE $gforge_db"
# Detect postgresql version, load tsearch2 for pg < 8.3
- pgv=`postgres --version | cut -d" " -f3`
+ pgv=
+ for i in postgres psql ; do
+ if [ "$(type -p $i)" != '' ] ; then
+ pgv=$($i --version | cut -d" " -f3)
+ fi
+ done
+ if [ "$pgv" = '' ] ; then
+ msg red "Error: Can't find command-line PostgreSQL client."
+ exit 2
+ fi
case $pgv in
7.*|8.1*|8.2*)
msg green " * Loading tsearch2 Database Into $gforge_db DB"
More information about the Fusionforge-commits
mailing list