From e3a7289768072a86a4cb31afbb0177bfd4afd5a2 Mon Sep 17 00:00:00 2001 From: "Huan-Ting,Chen" Date: Fri, 30 Apr 2021 01:11:20 +0800 Subject: [PATCH] fix update path bug --- libexec/spc-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/spc-update b/libexec/spc-update index dff7e13..9a4ba03 100755 --- a/libexec/spc-update +++ b/libexec/spc-update @@ -41,7 +41,7 @@ for config in "$@"; do ## create or update config ## In order to use `sed` on both linux and macos, generate backup file and delete it if grep -q "^${config_key}=.*" "${filename}"; then - sed -i.bak "s/^${config_key}=.*/${config}/g" "${filename}" + sed -i.bak "s@^${config_key}=.*@${config}@g" "${filename}" # config would contain '/', so change the syntax to '@' rm "${filename}.bak" else echo "${config}" >> "${filename}"