diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-08-20 23:33:39 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-08-20 23:33:39 +0000 |
commit | 57cdfc5052d648a98c04dc8d85dc678dfca824c2 (patch) | |
tree | 37f69ff9f98122d0b5ddf6ff2ae87d565b24466f /www/bricolage/files | |
parent | f2c0f51fd892cd49c2a937d059f7737abc60f34a (diff) |
Notes
Diffstat (limited to 'www/bricolage/files')
-rw-r--r-- | www/bricolage/files/bric_upgrade.sh | 41 | ||||
-rw-r--r-- | www/bricolage/files/patch-bin::bric_pgimport | 42 |
2 files changed, 69 insertions, 14 deletions
diff --git a/www/bricolage/files/bric_upgrade.sh b/www/bricolage/files/bric_upgrade.sh new file mode 100644 index 000000000000..ca425bbc5169 --- /dev/null +++ b/www/bricolage/files/bric_upgrade.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +BRICUPGRADE=%%PREFIX%% +NEWVERSION=%%PORTVERSION%% + +# Ensure the version exists +if [ "X" = "X${NEWVERSION}" ] +then + echo "New version not supplied (port bug)" + exit 1 +fi + +# Ensure the old version exists at the end of the argument list +OLDVERSION=`echo "$*" | sed -e "s/^.* \([^ ]*\)/\1/"` +VTEST=`echo "$OLDVERSION" | sed -e "s/^1\.8\.[01]$/OKAY/"` +if [ "${VTEST}" != "OKAY" ] +then + echo "The final argument should be the old version of the port, in the format." + echo " $0 [options] <version number>" + exit 1 +fi + +HAS_VERSION=`grep ${OLDVERSION} ${BRICUPGRADE}/versions.txt` +if [ "${HAS_VERSION}" = "" ] +then + echo "Version ${OLDVERSION} could not be found in the ${BRICUPGRADE}/versions.txt file" + echo "There are no components to upgrade" + exit 0 +fi + +# Now try to upgrade it +for ver in `grep -A 1000 ${OLDVERSION} ${BRICUPGRADE}/versions.txt | tail -n +2` +do + for file in `ls ${BRICUPGRADE}/${ver}` + do + ${BRICUPGRADE}/${ver}/${file} $@ # Run with our args + done +done + +echo "Upgrade complete" +exit 0 diff --git a/www/bricolage/files/patch-bin::bric_pgimport b/www/bricolage/files/patch-bin::bric_pgimport index 987d818529ad..38cf660e5ee0 100644 --- a/www/bricolage/files/patch-bin::bric_pgimport +++ b/www/bricolage/files/patch-bin::bric_pgimport @@ -1,22 +1,19 @@ -*** bin/bric_pgimport.orig Sun Feb 29 15:11:56 2004 ---- bin/bric_pgimport Tue Jun 1 22:55:42 2004 +*** bin/bric_pgimport.orig Tue Jun 8 22:22:34 2004 +--- bin/bric_pgimport Wed Aug 18 18:00:40 2004 *************** -*** 33,41 **** +*** 35,41 **** - =item -w - -! The directory with the CVS SQL files. Defaults to lib subdirectory of -! BRICOLAGE_ROOT environment variable, which itself defaults to + The directory with the Subversion SQL files. Defaults to lib subdirectory of + BRICOLAGE_ROOT environment variable, which itself defaults to ! F</usr/local/bricolage>. =item -u ---- 33,40 ---- - - =item -w +--- 35,41 ---- -! The directory with the Bricolage SQL files. Defaults to -! F</usr/local/share/bricolage>. + The directory with the Subversion SQL files. Defaults to lib subdirectory of + BRICOLAGE_ROOT environment variable, which itself defaults to +! F<%%SQLDIR%%>. =item -u @@ -32,14 +29,31 @@ } # Print a usage message unless all required args are included or if -h has ---- 188,197 ---- +--- 189,198 ---- if ($opt_w) { # Add on the location of the SQL. ! $opt_w = catdir($opt_w); } else { -! $ENV{BRICOLAGE_ROOT} ||= '/usr/local/share/bricolage'; +! $ENV{BRICOLAGE_ROOT} ||= '%%SQLDIR%%'; ! $opt_w = catdir($ENV{BRICOLAGE_ROOT}); } # Print a usage message unless all required args are included or if -h has +*************** +*** 252,258 **** + This should work if psql is in your path. + -w The directory with the Subversion SQL files. Defaults to lib subdirectory + of BRICOLAGE_ROOT environment variable, which itself defaults to +! /usr/local/bricolage. + -u Database user login. Defaults to PGUSER environment variable. + -p Database user password. Defaults to PGPASSWORD environment variable. + -d Database name. Defaults to PGDATABASE environment variable. +--- 252,258 ---- + This should work if psql is in your path. + -w The directory with the Subversion SQL files. Defaults to lib subdirectory + of BRICOLAGE_ROOT environment variable, which itself defaults to +! %%SQLDIR%%. + -u Database user login. Defaults to PGUSER environment variable. + -p Database user password. Defaults to PGPASSWORD environment variable. + -d Database name. Defaults to PGDATABASE environment variable. |