Skip to content
Snippets Groups Projects
Commit 9dcc6ef4 authored by Eliott Sammier's avatar Eliott Sammier
Browse files

CLI: add status command

parent 166cbeed
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash #!/usr/bin/env bash
# 'status' command is an exception, must be run before setting all the env vars
if [[ "$1" == "status" ]]; then
echo "VERSION=$VERSION"
echo "MACAO_ROOT=$MACAO_ROOT"
echo "SOURCES_DIR=$SOURCES_DIR"
echo "SCRIPTS_DIR=$SCRIPTS_DIR"
echo "RESULTS_DIR=$RESULTS_DIR"
echo "INDEXES_DIR=$INDEXES_DIR"
echo ""
echo "Python virtual env: ${VIRTUAL_ENV:-"not set"}"
echo -n "mcli: "
if which mcli >/dev/null; then echo "available"; else echo "not in PATH"; fi
echo ""
git status
exit
fi
export VERSION="${VERSION:-macao_12}" # macao_12 by default export VERSION="${VERSION:-macao_12}" # macao_12 by default
export MACAO_ROOT="${MACAO_ROOT:-$(dirname "$(realpath "$0")")}" export MACAO_ROOT="${MACAO_ROOT:-$(dirname "$(realpath "$0")")}"
export SOURCES_DIR="$MACAO_ROOT/Basilisk/MACAO/$VERSION" export SOURCES_DIR="$MACAO_ROOT/Basilisk/MACAO/$VERSION"
...@@ -14,6 +31,11 @@ Usage: $(basename "$0") <command> [args] ...@@ -14,6 +31,11 @@ Usage: $(basename "$0") <command> [args]
COMMANDS COMMANDS
status
Print useful info about the current environment.
shell [-p|--pyenv]
Open a shell with mcli's environment variables set, including PATH.
If -p or --pyenv is specified, also enter the Python virtual env.
list-streams <file> list-streams <file>
List audio streams in <file> List audio streams in <file>
count-streams [<file>] count-streams [<file>]
...@@ -29,9 +51,6 @@ extract-rdf ...@@ -29,9 +51,6 @@ extract-rdf
Run the extractor to generate RDF from text sources Run the extractor to generate RDF from text sources
extract-mp3 extract-mp3
Extract audio streams from all Flash SWF files Extract audio streams from all Flash SWF files
shell [-p|--pyenv]
Open a shell with mcli's environment variables set, including PATH.
If -p or --pyenv is specified, also enter the Python virtual env.
help help
Print this help and exit Print this help and exit
EOF EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment