diff --git a/recipe/post-link.sh b/recipe/post-link.sh index 46b0d0d..c52fdeb 100644 --- a/recipe/post-link.sh +++ b/recipe/post-link.sh @@ -1,13 +1,13 @@ #!/bin/bash set -e -[[ $(sed --version 2>/dev/null) ]] && opts=("-i" "-e") || opts=("-i" "" "-e") +[[ $(sed --version 2>/dev/null) ]] && opts=("-i" "-E") || opts=("-i" "" "-E") +menu="${PREFIX}/Menu/spyder-menu.json" if [[ -f "${PREFIX}/Menu/conda-based-app" ]]; then # Installed in installer environment, abridge shortcut name - menu="${PREFIX}/Menu/spyder-menu.json" - sed ${opts[@]} "s/ \(\{\{ ENV_NAME \}\}\)//g" $menu + sed "${opts[@]}" "s/ \(\{\{ ENV_NAME \}\}\)//g" $menu elif [[ -d "${PREFIX}/condabin" && -d "${PREFIX}/envs" ]]; then # Installed in a base environment, use distribution name - sed ${opts[@]} "s/ENV_NAME/DISTRIBUTION_NAME/g" $menu + sed "${opts[@]}" "s/ENV_NAME/DISTRIBUTION_NAME/g" $menu fi diff --git a/recipe/spyder-menu.json b/recipe/spyder-menu.json index cdc070f..20cf852 100644 --- a/recipe/spyder-menu.json +++ b/recipe/spyder-menu.json @@ -18,14 +18,15 @@ }, "linux": { "Categories": [ - "Graphics", + "Development", "Science" ], "command": ["{{ PREFIX }}/bin/spyder", "$@"], "StartupWMClass": "Spyder" }, "osx": { - "command": ["$(dirname $0)/python", "{{ PREFIX }}/bin/spyder", "$@"], + "precommand": "pushd \"$(dirname \"$0\")\" &>/dev/null", + "command": ["./python", "{{ PREFIX }}/bin/spyder", "$@"], "link_in_bundle": { "{{ PREFIX }}/bin/python": "{{ MENU_ITEM_LOCATION }}/Contents/MacOS/python" },