]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
lib.sh: remove unnecessary escaping
authorSimon Ruderich <simon@ruderich.org>
Sun, 3 Jun 2018 16:21:06 +0000 (18:21 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 3 Jun 2018 16:21:54 +0000 (18:21 +0200)
"~" shouldn't require escaping.

lib.sh

diff --git a/lib.sh b/lib.sh
index 12c9b08a665414e232fb10b343c1989f00312dfd..05341537363b6e2bf19ed44df8bd50c3d184a175 100644 (file)
--- a/lib.sh
+++ b/lib.sh
@@ -140,7 +140,7 @@ link() {
 
     # Get all necessary paths.
     pwd=`pwd`
-    base=`printf '%s' "$2" | sed "s|\~|$HOME|"` # expand ~, some sh don't do it
+    base=`printf '%s' "$2" | sed "s|~|$HOME|"` # expand ~, some sh don't do it
     base=`dirname "$base"`
     source=`printf '%s' "$pwd/$1" | sed "s|$base/||"`
     target=`basename "$2"`