1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/W/install_modules.bat

106 lines
2.3 KiB
Batchfile
Raw Normal View History

2018-05-07 16:04:23 +02:00
REM $Id: install_modules.bat,v 1.34 2018/04/10 00:10:52 gilles Exp gilles $
2013-05-21 00:04:57 +02:00
2016-09-19 17:17:24 +02:00
::------------------------------------------------------
::--------------- Main of install_modules.bat ----------
@SETLOCAL
2015-12-03 18:16:32 +01:00
@ECHO OFF
2016-09-19 17:17:24 +02:00
ECHO Currently running through %0 %*
2015-12-03 18:16:32 +01:00
@REM Needed with remote ssh
SET SHELL=
SET
2013-05-21 00:04:57 +02:00
ECHO Installing Perl modules for imapsync
2015-12-03 18:16:32 +01:00
CD /D %~dp0
2013-05-21 00:04:57 +02:00
2016-09-19 17:17:24 +02:00
CALL :handle_error CALL :detect_perl
CALL :handle_error CALL :update_modules
@ENDLOCAL
EXIT /B
::------------------------------------------------------
::------------------------------------------------------
::--------------- Detect Perl --------------------------
:detect_perl
@SETLOCAL
2013-07-06 00:26:28 +02:00
perl -v
IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://strawberryperl.com/ ^
2016-09-19 17:17:24 +02:00
&& PAUSE && EXIT 3
2016-01-22 17:52:28 +01:00
ECHO perl is there
2016-09-19 17:17:24 +02:00
@ENDLOCAL
EXIT /B
::------------------------------------------------------
2013-05-21 00:04:57 +02:00
2016-09-19 17:17:24 +02:00
::------------------------------------------------------
::---------------- Update modules ----------------------
:update_modules
@SETLOCAL
2015-05-28 19:04:57 +02:00
FOR %%M in ( ^
2018-05-07 16:04:23 +02:00
Regexp::Common ^
2017-09-23 23:54:48 +02:00
Sys::MemInfo ^
2016-09-19 17:17:24 +02:00
Test::MockObject ^
Readonly ^
2016-01-22 17:52:28 +01:00
Authen::NTLM ^
Crypt::SSLeay ^
Data::Uniqid ^
Digest::HMAC_MD5 ^
Digest::HMAC_SHA1 ^
Digest::MD5 ^
File::Copy::Recursive ^
Getopt::ArgvFile ^
Socket6 ^
IO::Socket::INET ^
IO::Socket::INET6 ^
IO::Socket::SSL ^
IO::Tee ^
Mail::IMAPClient ^
Module::ScanDeps ^
Net::SSL ^
PAR::Packer ^
2017-09-23 23:54:48 +02:00
Pod::Usage ^
2016-01-22 17:52:28 +01:00
Test::Pod ^
Unicode::String ^
URI::Escape ^
Crypt::OpenSSL::RSA ^
JSON ^
JSON::WebToken ^
LWP ^
HTML::Entities ^
Encode::Byte ^
) DO @perl -m%%M -e "print qq{Updating %%M $%%M::VERSION \n}" ^
2015-12-03 18:16:32 +01:00
& cpanm %%M
2013-05-21 00:04:57 +02:00
2015-12-03 18:16:32 +01:00
ECHO Perl modules for imapsync updated
2013-07-06 00:26:28 +02:00
REM PAUSE
2018-05-07 16:04:23 +02:00
@ECHO Net::SSLeay not updated
2016-09-19 17:17:24 +02:00
@ENDLOCAL
EXIT /B
2017-09-23 23:54:48 +02:00
2016-09-19 17:17:24 +02:00
::------------------------------------------------------
::------------------------------------------------------
::----------- Handle errors in LOG_bat\ directory ------
:handle_error
SETLOCAL
ECHO IN %0 with parameters %*
%*
SET CMD_RETURN=%ERRORLEVEL%
2013-05-21 00:04:57 +02:00
2016-09-19 17:17:24 +02:00
IF %CMD_RETURN% EQU 0 (
ECHO GOOD END
) ELSE (
ECHO BAD END
IF NOT EXIST LOG_bat MKDIR LOG_bat
ECHO Failure calling with extra %* >> LOG_bat\%~nx0.txt
)
ENDLOCAL
EXIT /B
::------------------------------------------------------
2013-05-21 00:04:57 +02:00