env script alias the hollywoo scripts for global use
This commit is contained in:
@@ -1,31 +1,41 @@
|
||||
#! /bin/bash
|
||||
# Usage: source env.sh
|
||||
|
||||
if [ -d "env" ]; then
|
||||
source_and_alias() {
|
||||
source env/bin/activate
|
||||
exit 0
|
||||
fi
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
alias transcribe-voice-track="python ${SCRIPT_DIR}/transcribe-voice-track.py"
|
||||
alias amplify-voice-tracks="python ${SCRIPT_DIR}/amplify-voice-tracks.py"
|
||||
alias combine-voice-tracks="python ${SCRIPT_DIR}/combine-voice-tracks.py"
|
||||
alias cut-voice-track="python ${SCRIPT_DIR}/cut-voice-track.py"
|
||||
alias join-partial-lines="python ${SCRIPT_DIR}/join-partial-lines.py"
|
||||
}
|
||||
|
||||
if [ -z "$(which ffmpeg)" ]; then
|
||||
echo "ffmpeg must be installed!"
|
||||
fi
|
||||
if [ -d "env" ]; then
|
||||
source_and_alias
|
||||
else
|
||||
|
||||
PYTHON=$(which python)
|
||||
if [ -z "$PYTHON" ]; then
|
||||
PYTHON=$(which python3)
|
||||
fi
|
||||
if [ -z "$PYTHON" ]; then
|
||||
echo "No python!"
|
||||
fi
|
||||
if [ -z "$(which ffmpeg)" ]; then
|
||||
echo "ffmpeg must be installed!"
|
||||
fi
|
||||
|
||||
$PYTHON -m venv env
|
||||
source env/bin/activate
|
||||
PYTHON=$(which python)
|
||||
if [ -z "$PYTHON" ]; then
|
||||
PYTHON=$(which python3)
|
||||
fi
|
||||
if [ -z "$PYTHON" ]; then
|
||||
echo "No python!"
|
||||
fi
|
||||
|
||||
pip install -r requirements.txt
|
||||
$PYTHON -m venv env
|
||||
source_and_alias
|
||||
|
||||
case "$OSTYPE" in
|
||||
msys*) ;;
|
||||
cygwin*) ;;
|
||||
*) pip install -r requirements-unix.txt
|
||||
esac
|
||||
pip install -r requirements.txt
|
||||
|
||||
case "$OSTYPE" in
|
||||
msys*) ;;
|
||||
cygwin*) ;;
|
||||
*) pip install -r requirements-unix.txt
|
||||
esac
|
||||
|
||||
fi
|
Reference in New Issue
Block a user