Skip to content

Commit

Permalink
add default activate_python.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kamo-naoyuki committed Dec 19, 2020
1 parent bba6712 commit eab143d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,5 @@ tools/PESQ*
tools/hts_engine_API*
tools/open_jtalk*
tools/pyopenjtalk*
tools/activate_python.sh
tools/sctk*
tools/sph2pipe*
18 changes: 18 additions & 0 deletions tools/activate_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
if [ -n "${BASH_VERSION:-}" ]; then
# shellcheck disable=SC2046
TOOL_DIR="$( cd $( dirname ${BASH_SOURCE[0]} ) >/dev/null 2>&1 && pwd )"
elif [ -n "${ZSH_VERSION:-}" ]; then
# shellcheck disable=SC2046
TOOL_DIR="$( cd $( dirname ${(%):-%N} ) >/dev/null 2>&1 && pwd )"
else
# assume something else
echo "ERROR: Must be executed by bash or zsh."
fi

if [ -z "${TOOL_DIR}" ]; then
echo "ERROR: Cannot derive the directory path of espnet/tools. This might be a bug."
return 1
fi

echo "Warning! You haven't set Python environment yet. Go to ${TOOL_DIR} and generate 'activate_python.sh'"

0 comments on commit eab143d

Please sign in to comment.