From 1bb8c5b387673e2c069a41ca4fc793b1d4c0869b Mon Sep 17 00:00:00 2001 From: "thibault.dewailly" Date: Tue, 3 May 2016 11:25:37 +0200 Subject: [PATCH] Fixed replace in file function with proper substitution --- lib/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.sh b/lib/utils.sh index abd9e72..118cf35 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -138,7 +138,7 @@ replace_in_file() { backup_file "$FILE" debug "Replacing $SOURCE to $DESTINATION in $FILE" - SOURCE=$(sed 's@/@\\\/@g' <<< $PATTERN) + SOURCE=$(sed 's@/@\\\/@g' <<< $SOURCE) debug "sed -i 's/$SOURCE/$DESTINATION/g' $FILE" sed -i "s/$SOURCE/$DESTINATION/g" $FILE FNRET=0