Skip to content

Commit 51bc474

Browse files
committed
fix: emby config editor sed error in macos
1 parent d98ca8d commit 51bc474

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

emby_config_editor.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ if [ ! -d "${config_dir}" ]; then
318318
mkdir -p "${config_dir}"
319319
fi
320320

321-
find "${config_dir}" -type f -name "*.txt" -exec sed -i "s/\r$//g" {} \;
321+
if [[ "$(uname -s)" == "Darwin" ]]; then
322+
find "${config_dir}" -type f -name "*.txt" -exec sed -i '' "s/\r$//g" {} \;
323+
else
324+
find "${config_dir}" -type f -name "*.txt" -exec sed -i "s/\r$//g" {} \;
325+
fi
322326

323327
if [ ! -s "${config_dir}/emby_config.txt" ]; then
324328
{

0 commit comments

Comments
 (0)