-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the issue that virtual environments on extra tools based are tota…
…lly not recognized
- Loading branch information
Showing
4 changed files
with
106 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Copyright 2020 (c) Vladislav Punko <[email protected]> | ||
|
||
set -o errexit | ||
|
||
# Exit if this script is run as the superuser. | ||
if [ "$(id -u)" -ne 0 ]; then | ||
echo 'This program needs to be run as a superuser on the current operating system.' >&2 | ||
# Stop this program runtime and return the exit status code. | ||
exit 13 | ||
fi | ||
|
||
workdir="$(mktemp -d)" | ||
|
||
# Step -- 1. | ||
git clone --depth=1 --branch=master -- https://github.com/vladpunko/notebook-environments.git "${workdir}" > /dev/null 2>&1 || { | ||
echo 'An error occurred while downloading the source code to the current machine.' >&2 | ||
# Stop this program runtime and return the exit status code. | ||
exit 70 | ||
} | ||
|
||
# Step -- 2. | ||
install -m 755 "${workdir}/n.sh" /usr/local/bin/n | ||
|
||
# Step -- 3. | ||
install -m 755 "${workdir}/notebook_environments.py" /usr/local/bin/notebook-environments | ||
|
||
_cleanup() { | ||
rm -r -- "${workdir}" | ||
} | ||
trap _cleanup EXIT |
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