# HG changeset patch # User thomase # Date 1251219356 -3600 # Node ID 759027e1c6b32b0b858fca7d116b7f1d00704b26 # Parent a1155a089aba0126906d53a4245733fcfb9e28aa Improved robustness of package list location searching. diff -r a1155a089aba -r 759027e1c6b3 clone_packages/clone_all_packages.pl --- a/clone_packages/clone_all_packages.pl Tue Aug 25 17:31:00 2009 +0100 +++ b/clone_packages/clone_all_packages.pl Tue Aug 25 17:55:56 2009 +0100 @@ -81,10 +81,14 @@ my $exec = 0; my $filter = ""; -my $sf_pkg_list_file = "sf_mcl_packages.txt"; -my $sftools_pkg_list_file = "sftools_mcl_packages.txt"; -my $other_pkg_list_file = "other_packages.txt"; +# Extract the path location of the program and locate package list files +my $program_path = $0; +$program_path =~ s#(^.*\\)[^\\]+$#$1#; +my $sf_pkg_list_file = $program_path."sf_mcl_packages.txt"; +my $sftools_pkg_list_file = $program_path."sftools_mcl_packages.txt"; +my $other_pkg_list_file = $program_path."other_packages.txt"; +# Analyse the rest of command-line parameters if (!GetOptions( "u|username=s" => \$username, "p|password=s" => \$password,