From c2eea80929328a6e665fcaaa2315dae72d1dd333 Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Tue, 15 Jan 2019 11:19:30 +0100 Subject: [PATCH] Add platform check for sed command This checks if the current platform is macOS (darwin), which uses a sed version that accepts arguments differently --- burrow | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/burrow b/burrow index 6b93563..c7d9f10 100755 --- a/burrow +++ b/burrow @@ -166,7 +166,11 @@ update_gopher_root () { "$newdate" \ "$config_gopher_server" \ "$config_gopher_port") - sed -i '' "s|.*Last\\ Updated:.*|${newString}|" "${config_dir_gopher}gophermap" + if [ "$(uname)" = "Darwin" ]; then + sed -i '' "s|.*Last\\ Updated:.*|${newString}|" "${config_dir_gopher}gophermap" + else + sed -i'' "s|.*Last\\ Updated:.*|${newString}|" "${config_dir_gopher}gophermap" + fi } check_directory () {