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" -- "$@"
# 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"`
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