Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] PERFORCE change 80594 by Jason Flatt for review

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Perforce Review Daemon <p4review AT smee.org>
  • To: "Arjan Bouter" <abouter AT sourcemage.org>, "SM-Commit Daemon" <sm-commit AT lists.ibiblio.org>, "duane_malcolm" <d.malcolm AT auckland.ac.nz>, "Ethan Grammatikidis" <eekee AT eekee.is-a-geek.org>, "Gareth Clay" <gareth AT caffeinefuelled.co.uk>, "Maurizio Boriani" <baux AT member.fsf.org>, "Pieter Lenaerts" <e-type AT sourcemage.org>, "Robin Cook" <rcook AT wyrms.net>, "Seth Woolley" <seth AT swoolley.homeip.net>, "Unet" <unet AT sourcemage.org>, "vladimir_marek" <vlmarek AT volny.cz>
  • Subject: [SM-Commit] PERFORCE change 80594 by Jason Flatt for review
  • Date: Tue, 13 Jun 2006 15:45:01 +0100 (BST)

Change 80594 by jason_flatt@jason-jason on 2006/06/13 15:41:12

Tweak of installation based on options chosen.

Affected files ...

... //sgl/grimoires/devel/collab/drupal/HISTORY#13 edit
... //sgl/grimoires/devel/collab/drupal/INSTALL#6 edit
... //sgl/grimoires/devel/collab/drupal/PREPARE#5 edit

Differences ...

==== //sgl/grimoires/devel/collab/drupal/HISTORY#13 (text) ====

@@ -1,3 +1,10 @@
+2006-06-13 Jason Flatt <jflatt AT sourcemage.org>
+ * INSTALL: Modified the parts that create the database and modify the
+ settings.php file to take into account the two Drupal versions and
+ the two possible database choices.
+ * PREPARE: Changed the order for version install so that the more
+ current version is the default.
+
2006-06-08 John Harding <johnh AT kuberaconsulting.com>
* DETAILS: Security update, added if statement to allow choice between
4.6.8 and 4.7.2 versions. Changed to SOURCE_HASH because I couldn't
get

==== //sgl/grimoires/devel/collab/drupal/INSTALL#6 (xtext) ====

@@ -13,7 +13,17 @@
#
# Return true as this will fail if the database already exists
#
- mysql ${DRUPAL_DATABASE_NAME} < database/database.mysql || true
+ if [ "${DRUPAL_VER}" == "newer" ]; then
+ if [ "`mysql -V | cut -d" " -f6 | cut -d"." -f1`" > "4" ]
||
+ [ "`mysql -V | cut -d" " -f6 | cut -d"." -f1`" == "4" ]
&&
+ [ "`mysql -V | cut -d" " -f6 | cut -d"." -f2`" > "0" ];
then
+ mysql ${DRUPAL_DATABASE_NAME} < database/database.4.1.mysql
|| true
+ else
+ mysql ${DRUPAL_DATABASE_NAME} < database/database.4.0.mysql
|| true
+ fi
+ else
+ mysql ${DRUPAL_DATABASE_NAME} < database/database.mysql ||
true
+ fi
;;

postgresql)
@@ -35,10 +45,24 @@
if [ "${DRUPAL_CONFIGURE}" == "y" ]; then
# Update the sites/default/settings.php configuration file
# The database connection string
- sedit
"s|username:password@localhost/database|${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
&&
+ if [ "${DRUPAL_VER}" == "newer" ]; then
+ if [ "${DRUPAL_DATABASE_ENGINE}" == "mysql" ]; then
+ sedit "s|\$db_url =
'mysql://username:password@localhost/databasename';|\$db_url =
'mysql://${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}';|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
+ else
+ sedit "s|\$db_url =
'mysql://username:password@localhost/databasename';|\$db_url =
'pgsql://${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}';|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
+ fi
+ else
+ if [ "${DRUPAL_DATABASE_ENGINE}" == "mysql" ]; then
+ sedit "s|\$db_url =
'mysql://username:password@localhost/database';|\$db_url =
'mysql://${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}';|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
+ else
+ sedit "s|\$db_url =
'mysql://username:password@localhost/database';|\$db_url =
'pgsql://${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}';|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
+ fi
+ fi
&&

- # The base URL string
- sedit "s|http://localhost|http://localhost/${SPELL}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php &&
+ # The base URL string (this part can be removed when support for 4.6 is
removed)
+ if [ "${DRUPAL_VER}" == "older" ]; then
+ sedit "s|http://localhost|http://localhost/${SPELL}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
+ fi
&&

mkdir ${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/files
fi
&&

==== //sgl/grimoires/devel/collab/drupal/PREPARE#5 (xtext) ====

@@ -1,6 +1,9 @@
-config_query_list DRUPAL_VER "Do you wish to install the older or newer
version of Drupal (both are considered stable)?" \
- "older" "newer" &&
-persistent_add DRUPAL_INSTALLED &&
+config_query_list DRUPAL_VER
\
+ "Do you wish to install the newer (4.7) or older (4.6)
version of Drupal (both are considered stable)?" \
+ "newer"
\
+ "older"
&&
+
+persistent_add DRUPAL_INSTALLED
&&
if spell_ok ${SPELL}
then
DRUPAL_INSTALLED="y"



  • [SM-Commit] PERFORCE change 80594 by Jason Flatt for review, Perforce Review Daemon, 06/13/2006

Archive powered by MHonArc 2.6.24.

Top of Page