X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=lib.sh;h=05341537363b6e2bf19ed44df8bd50c3d184a175;hp=0329a0f05a4cc85965ca36af9a07b4749ef58f1b;hb=9e4b2aff9242c3e72c714c3bf01c670b576e6627;hpb=78be217cf70604a6f241f35cc622a5153198c46a diff --git a/lib.sh b/lib.sh index 0329a0f..0534153 100644 --- 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" -- "$@" @@ -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"`