summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2007-09-01 15:20:33 +0000
committerNicolas Thill <nico@openwrt.org>2007-09-01 15:20:33 +0000
commitb518cc2c00e024805c749da5e153f6fca5ca8c30 (patch)
tree71dd0fd8d0283ba37d9e93c872e48d1555c349fa /scripts
parent393c8bff072731e5ab2e544d286ebd68522787e6 (diff)
downloadmtk-20170518-b518cc2c00e024805c749da5e153f6fca5ca8c30.zip
mtk-20170518-b518cc2c00e024805c749da5e153f6fca5ca8c30.tar.gz
mtk-20170518-b518cc2c00e024805c749da5e153f6fca5ca8c30.tar.bz2
add an abs2rel.pl helper script (returns a path relative to another)
SVN-Revision: 8570
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 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";