From a4933383de2276a506f0df7d428f747a66733995 Mon Sep 17 00:00:00 2001 From: George Clark Date: Sat, 23 Aug 2014 09:19:11 -0400 Subject: [PATCH] Item11267: Enhance pseudo-install for non-foswiki Adding a -N flag to disable linking of the githooks. This is useful if the extension is in a repository that is not part of the foswiki project. Also add example of using a local File based repository. --- core/pseudo-install.pl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/pseudo-install.pl b/core/pseudo-install.pl index 80d29d4430..44b6b41a36 100755 --- a/core/pseudo-install.pl +++ b/core/pseudo-install.pl @@ -46,6 +46,7 @@ -[L]ist - list all the foswiki extensions that could be installed by asking all the extension repositories that are known from the .buildcontrib -[s]vn - Create subversion connections for git-svn usage + -N[ohooks] - Disable linking of git hooks. Not for foswiki repositories! Examples: softlink and enable FirstPlugin and SomeContrib @@ -65,8 +66,10 @@ Then, install extensions (missing modules automatically cloned & configured for git-svn against svn.foswiki.org; 'master' branch is svn's trunk, see [1]): ./pseudo-install.pl developer - Install & enable an extension from an abritrary git repo - ./pseudo-install.pl -e git@github.com:/me/MyPlugin.git + Install & enable an extension from an abritrary git repo without enabling hooks + ./pseudo-install.pl -e -N git@github.com:/me/MyPlugin.git + Install an extension from a local file based git repo, without hooks + ./pseudo-install.pl -N file:///home/git/LocalDataContrib Install UnitTestContrib and include config values into LocalSite.cfg from lib/Foswiki/Contrib/UnitTestContrib/AutoBuildSelenium.cfg ./pseudo-install.pl -EAutoBuildSelenium UnitTestContrib @@ -88,6 +91,7 @@ my @extensions_path; my %extensions_extra_config; my $autoenable = 0; +my $githooks = 1; my $svnconnect = 0; my $installing = 1; my $autoconf = 0; @@ -117,6 +121,9 @@ '-m' => sub { $autoenable = 0; }, + '-N' => sub { + $githooks = 0; + }, '-s' => sub { $svnconnect = 1; }, @@ -473,7 +480,7 @@ sub installModuleByName { warn "---> No MANIFEST in $module" . ( $manifest ? "(at $manifest)" : '' ) . "\n"; } - update_githooks_dir( $moduleDir, $module ); + update_githooks_dir( $moduleDir, $module ) if ($githooks); return $libDir; } @@ -1685,7 +1692,7 @@ sub update_githooks_dir { init_extensions_path(); run(); update_gitignore_file($basedir); -update_githooks_dir( $basedir, 'core' ); +update_githooks_dir( $basedir, 'core' ) if ($githooks); __END__ Foswiki - The Free and Open Source Wiki, http://foswiki.org/