From c41f50890836f8b0c626716674b80e5f629550f8 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 21 Jun 2020 12:34:24 -0400 Subject: improve error handling --- firefox-sideloader/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox-sideloader/functions.sh b/firefox-sideloader/functions.sh index 2934c09..eb7a9a9 100644 --- a/firefox-sideloader/functions.sh +++ b/firefox-sideloader/functions.sh @@ -69,7 +69,7 @@ filter() copy_json_file_with_filter() { which mozlz4 >/dev/null || PATH=$HOME/.cargo/bin:$PATH - which mozlz4 >/dev/null || exit 1 + which mozlz4 >/dev/null || return local new="$1" old="$2" f="$3" filter_json filter_json="s/${old//\//\\/}/${new//\//\\/}/g" [ -d "$old" -a -d "$new" ] || return @@ -133,8 +133,8 @@ clone_profile_raw() cp -r --preserve=mode,timestamps -t "$new_profile_dir" -- "$old_profile_dir"/{extensions/,extension-{setting,preference}s.json} || return - copy_json_file_with_filter "$new_profile_dir" "$old_profile_dir" 'extensions.json' - copy_json_file_with_filter "$new_profile_dir" "$old_profile_dir" 'addonStartup.json.lz4' + copy_json_file_with_filter "$new_profile_dir" "$old_profile_dir" 'extensions.json' || return + copy_json_file_with_filter "$new_profile_dir" "$old_profile_dir" 'addonStartup.json.lz4' || return prefs } -- cgit v1.2.3