summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-01 15:20:33 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-01 15:20:33 +0000
commit57cacb623bb9589a3f4a9e19d54a18da81516baa (patch)
tree4fac40632814843bcddc365d0d7022f98b41ff92 /scripts
parent17b183947df361ae3a3db50a0e29428b6725b82b (diff)
add an abs2rel.pl helper script (returns a path relative to another)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8570 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/abs2rel.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/abs2rel.pl b/scripts/abs2rel.pl
new file mode 100755
index 000000000..1bd9a14af
--- /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";