[DebianGIS-dev] r1843 - scripts

frankie at alioth.debian.org frankie at alioth.debian.org
Wed Jan 14 11:19:41 UTC 2009


Author: frankie
Date: 2009-01-14 11:19:41 +0000 (Wed, 14 Jan 2009)
New Revision: 1843

Modified:
   scripts/dgis-status.pl
Log:
Better management of local includes directory.


Modified: scripts/dgis-status.pl
===================================================================
--- scripts/dgis-status.pl	2009-01-14 10:50:00 UTC (rev 1842)
+++ scripts/dgis-status.pl	2009-01-14 11:19:41 UTC (rev 1843)
@@ -41,6 +41,13 @@
 use FileHandle;
 use SVN::Client;
 
+use Cwd qw(abs_path);
+use File::Basename;
+BEGIN {
+        my $dirname  = dirname abs_path $0;
+        unshift @INC, $dirname;
+}
+
 use AptPkg::Config '$_config';
 use AptPkg::System '$_system';
 use AptPkg::Version;
@@ -48,9 +55,6 @@
 getopts('odhuvf:');    # -o option: only do difference (no wget)
 our ( $opt_o, $opt_h, $opt_u, $opt_v, $opt_b, $opt_c, $opt_d, $opt_f );
 
-#push @INC, $ENV{'HOME'}."/pkg-grass/scripts";
-push @INC, $ENV{'HOME'} . "work/ubuntugis/pkg-grass/scripts";
-
 #my $_stable   = "fred";
 #my $_unstable = "fred";
 #my $_ubuntu   = "fred";
@@ -164,15 +168,13 @@
     my ( $source_package, $file_name ) = @_;
 
     eval {
-        my $client =
-          SVN::Client->new( auth => [ SVN::Client::get_simple_provider() ] );
+        my $client = SVN::Client->new( auth => [ SVN::Client::get_simple_provider() ] );
         my $dirent = $client->ls(
             "$svn_repo/packages/$source_package/trunk/debian/$file_name",
             'HEAD', 1 );
     };
     return undef if $@;
-    return
-"$web_repo/packages/$source_package/trunk/debian/$file_name?op=file&rev=0&sc=0";
+    return "$web_repo/packages/$source_package/trunk/debian/$file_name?op=file&rev=0&sc=0";
 }
 
 unless ($opt_o) {    # Skip wget if -o option "only difference"




More information about the Pkg-grass-devel mailing list