projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
393c8bf
)
add an abs2rel.pl helper script (returns a path relative to another)
author
Nicolas Thill
<nico@openwrt.org>
Sat, 1 Sep 2007 15:20:33 +0000
(15:20 +0000)
committer
Nicolas Thill
<nico@openwrt.org>
Sat, 1 Sep 2007 15:20:33 +0000
(15:20 +0000)
SVN-Revision: 8570
scripts/abs2rel.pl
[new file with mode: 0755]
patch
|
blob
diff --git a/scripts/abs2rel.pl
b/scripts/abs2rel.pl
new file mode 100755
(executable)
index 0000000..
1bd9a14
--- /dev/null
+++ b/
scripts/abs2rel.pl
@@ -0,0
+1,17
@@
+#!/usr/bin/perl
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+use strict;
+require File::Spec;
+
+my $source = shift @ARGV;
+my $target = shift @ARGV;
+my $result = File::Spec->abs2rel($source, $target);
+
+print "$result\n";