]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - lib.sh
lib.sh: escape \b in double quoted string
[config/dotfiles.git] / lib.sh
diff --git a/lib.sh b/lib.sh
index 1ce0c33c4e96468aab048bf1b40d3997ab486819..12c9b08a665414e232fb10b343c1989f00312dfd 100644 (file)
--- a/lib.sh
+++ b/lib.sh
@@ -101,7 +101,7 @@ simple_cpp() {
             break
         fi
 
-        cmd="$cmd s/\b$x\b/\$ARGV[\$i]/g; \$i++;"
+        cmd="$cmd s/\\b$x\\b/\$ARGV[\$i]/g; \$i++;"
     done
 
     perl_line_filter "$cmd" -- "$@"
@@ -168,7 +168,7 @@ link() {
     ln -s "$source" "$target"
 
     # Go back to the directory where we were before.
-    cd "$pwd"
+    cd "$pwd" || return 1
 }
 
 # Generate a file from a source file using a given command. A warning not to