[Fusioninventory-devel] Building the FusionInventory Agent Windows package...
Tomás Abad
tabadgp at gmail.com
Fri Jul 20 16:40:35 UTC 2012
Hello to everybody,
On 20/07/12 13:05, Tomás Abad wrote:
> Hello to everybody,
>
> Here you are attached a more 'sophisticated' script to upgrade and
> to install missing Perl modules. The script file name is
> 'upgrade-perl-modules-and-dependencies.bat' but Google don't let me
> attach the file with this name, please, rename it.
I have detected a bug in the previous script. The new attached file
resolves the problem.
--
Tomas Abad
Ingeniero de Sistemas / Systems Engineer
-------------- next part --------------
:: ------------------------------------------------------------------------
:: FusionInventory
:: Copyright (C) 2010-2012 by the FusionInventory Development Team.
::
:: http://www.fusioninventory.org/ http://forge.fusioninventory.org/
:: ------------------------------------------------------------------------
::
:: LICENSE
::
:: This file is part of FusionInventory project.
::
:: FusionInventory is free software: you can [...]
::
:: FusionInventory is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU Affero General Public License for more details.
::
:: You should have received a copy of [...]
::
:: ------------------------------------------------------------------------
::
:: @package FusionInventory Agent Installer for Microsoft Windows
:: @file .\Perl\Scripts\upgrade-perl-modules-and-dependencies.bat
:: @author Tomas Abad
:: @copyright Copyright (c) 2010-2012 FusionInventory Team
:: @license [...]
:: @link http://www.fusioninventory.org/
:: @link http://forge.fusioninventory.org/projects/fusioninventory-agent
:: @since 2012
::
:: ------------------------------------------------------------------------
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
:: env variables
set TERM=dumb
set PERL_JSON_BACKEND=JSON::XS
set PERL_YAML_BACKEND=YAML
:: avoid collisions with other perl stuff on your system
set PERL5LIB=
set PERL5OPT=
set PERL_MM_OPT=
set PERL_MB_OPT=
:: show Perl information
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $^X, $^V)" 2> NUL
:: set proxy environment variables
:: Uncomment and defines the lines below to use the proxy server
:: set HTTP_PROXY=http://[username:password@]your.http.server.proxy:port/
:: set HTTPS_PROXY=https://[username:password@]your.https.server.proxy:port/
:: set FTP_PROXY=ftp://[username:password@]your.ftp.server.proxy:port/
:: set NO_PROXY=localhost,...
:: set more variables
set FUSINV_AGENT=FusionInventory::Agent
set FUSINV_TASK_DEPLOY=FusionInventory::Agent::Task::Deploy
set FUSINV_TASK_ESX=FusionInventory::Agent::Task::ESX
set FUSINV_TASK_NETDISCOVERY=FusionInventory::Agent::Task::NetDiscovery
set FUSINV_TASK_NETINVENTORY=FusionInventory::Agent::Task::NetInventory
set FUSINV_TASKS=%FUSINV_TASK_DEPLOY% %FUSINV_TASK_ESX% %FUSINV_TASK_NETDISCOVERY% %FUSINV_TASK_NETINVENTORY%
:: erase temporary cpanm files
rmdir /q /s %drivep%\data\.cpanm 2> NUL
:: upgrade the environment
perl %drivep%\perl\bin\cpanm --self-upgrade --installdeps --skip-installed --auto-cleanup 1 --notest %FUSINV_AGENT% %FUSINV_TASKS%
:: show information
echo Take a look at the file %drivep%\data\.cpanm\build.log for more information.
More information about the Fusioninventory-devel
mailing list