From e2791a37025411fb1d37b831c4de2492e2b6ba63 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 6 Sep 2008 13:04:54 +0000 Subject: [PATCH] Packager now gets a config file on the command line (more secure for buildbot). --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402502 --- tools/buildbot/package.pl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/buildbot/package.pl b/tools/buildbot/package.pl index 26f11618..99e33b68 100755 --- a/tools/buildbot/package.pl +++ b/tools/buildbot/package.pl @@ -5,12 +5,21 @@ use Cwd; use File::Basename; use Net::FTP; -my ($ftp_host, $ftp_user, $ftp_pass, $ftp_path); +my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path); -$ftp_host = shift; -$ftp_user = shift; -$ftp_pass = shift; -$ftp_path = shift; +$ftp_file = shift; + +open(FTP, $ftp_file) or die "Unable to read FTP config file $ftp_file: $!\n"; +$ftp_host = ; +$ftp_user = ; +$ftp_pass = ; +$ftp_path = ; +close(FTP); + +chomp $ftp_host; +chomp $ftp_user; +chomp $ftp_pass; +chomp $ftp_path; my ($myself, $path) = fileparse($0); chdir($path);