-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from mrclary/menuinst-v1
Include a menuinst v1 spec file in case users have not updated to menuinst v2 in their base env
- Loading branch information
Showing
4 changed files
with
58 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"menu_name": "${DISTRIBUTION_NAME} spyder", | ||
"menu_items": | ||
[ | ||
{ | ||
"name": "Spyder __PKG_MAJOR_VER__", | ||
"pywscript": "${PYTHON_SCRIPTS}/spyder-script.py", | ||
"workdir": "${PERSONALDIR}/Python Scripts", | ||
"icon": "${MENU_DIR}/spyder.ico" | ||
} | ||
] | ||
} |