[SCM] live-boot branch, debian-next, updated. debian/3.0_a25-1-70-ga39a167

Daniel Baumann daniel at debian.org
Thu Apr 5 06:00:34 UTC 2012


The following commit has been merged in the debian-next branch:
commit 2d129205223e1fb6322bb03a9cb9fdf1736885b8
Author: Tails developers <amnesia at boum.org>
Date:   Tue Mar 20 17:36:18 2012 +0100

    Make trim_path() handle "/", and arbitrarily many consecutive /:es.

diff --git a/scripts/live-helpers b/scripts/live-helpers
index 1f2fb80..75fc106 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -519,8 +519,9 @@ where_is_mounted ()
 }
 
 trim_path () {
-    # remove all unnecessary /:s in the path, including last
-    echo ${1} | sed 's|//|/|g' | sed 's|/$||'
+    # remove all unnecessary /:s in the path, including last one (except
+    # if path is just "/")
+    echo ${1} | sed 's|//\+|/|g' | sed 's|^\(.*[^/]\)/$|\1|'
 }
 
 what_is_mounted_on ()

-- 
live-boot



More information about the debian-live-changes mailing list