[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 1/2] Move normalize_path to a common file
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 1/2] Move normalize_path to a common file |
Date: |
Tue, 18 Nov 2014 11:47:41 +0100 |
We will need this function in a different script soon.
---
quilt/scripts/patchfns.in | 9 +++++++++
quilt/setup.in | 9 ---------
2 files changed, 9 insertions(+), 9 deletions(-)
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -108,6 +108,15 @@ quote_glob()
echo "$1" | sed -e 's:\([][*?\\]\):\\\1:g'
}
+# Resolve ".." in path and clean up double slashes
+normalize_path()
+{
+ echo "$1" | sed -r -e 's://:/:g' \
+ -e ':again' \
+ -e 's:/[^/]+/\.\.(/|$):\1:g' \
+ -e 'tagain'
+}
+
patch_file_name()
{
echo "$QUILT_PATCHES/$1"
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -71,15 +71,6 @@ check_for_existing_files()
return $status
}
-# Resolve ".." in path and clean up double slashes
-normalize_path()
-{
- echo "$1" | sed -r -e 's://:/:g' \
- -e ':again' \
- -e 's:/[^/]+/\.\.(/|$):\1:g' \
- -e 'tagain'
-}
-
create_symlink()
{
local target=$1 link=$2 up
--
Jean Delvare
SUSE L3 Support
- [Quilt-dev] [PATCH 1/2] Move normalize_path to a common file,
Jean Delvare <=