瀏覽代碼

add an abs2rel.pl helper script (returns a path relative to another)

SVN-Revision: 8570
Nicolas Thill 18 年之前
父節點
當前提交
b518cc2c00
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. 17 0
      scripts/abs2rel.pl

+ 17 - 0
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";