3
# The contents of this file are subject to the Mozilla Public
4
# License Version 1.1 (the "License"); you may not use this file
5
# except in compliance with the License. You may obtain a copy of
6
# the License at http://www.mozilla.org/MPL/
8
# The Initial Developer of the Original Code is Netscape
9
# Communications Corporation. Portions created by Netscape are
10
# Copyright (C) 2002 Netscape Communications Corporation. All
16
print "Usage: $0 dest_path start_path\n" if ($#ARGV+1 != 2);
17
my $finish = my_canonpath(shift);
18
my $start = my_canonpath(shift);
20
my $res = File::Spec::Unix->abs2rel($finish, $start);
22
#print STDERR "abs2rel($finish,$start) = $res\n";
27
my (@inlist, @outlist, $dir);
29
# Do what File::Spec::Unix->no_upwards should do
30
my @inlist = split(/\//, File::Spec::Unix->canonpath($file));
31
foreach $dir (@inlist) {
38
$file = join '/',@outlist;