Skip to content

Commit

Permalink
Create .bak file when using REPLACE during upgrade (openhab#1004)
Browse files Browse the repository at this point in the history
- Makes the command Mac OS compatible

Signed-off-by: Ben Clark <[email protected]>
  • Loading branch information
BClark09 authored and kaikreuzer committed Nov 16, 2019
1 parent 35fffb1 commit 7b02719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distributions/openhab/src/main/resources/bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ runCommand() {
# Avoid error if file does not exist
if [ -f "$param3" ]; then
echo " Replacing: String $param1 to $param2 in file $param3"
sed -i "s:$param1:$param2:g" "$param3"
sed -i'.bak' -e "s:$param1:$param2:g" "$param3"
fi
;;
'NOTE') printf ' \033[32mNote:\033[m %s\n' "$param1";;
Expand Down

0 comments on commit 7b02719

Please sign in to comment.