<gitroot>/tito wrapper

This makes executing of Tito-from-Git a bit more convenient.
This commit is contained in:
Pavel Raiskup 2024-02-21 09:09:48 +01:00 committed by Jakub Kadlčík
parent c6c091177d
commit 6d09a79369

14
tito Executable file
View file

@ -0,0 +1,14 @@
#! /bin/sh
gitrootdir=$(readlink -f "$(dirname "$0")")
run_python=${PYTHON-python3}
echo >&2 "\
Warning: Running Tito from a git repository is not supported.
If you are not a developer working on Tito code, please install it properly
https://github.com/rpm-software-management/tito/blob/master/doc/index.md#install
"
export PYTHONPATH
PYTHONPATH=$gitrootdir/src/${PYTHONPATH+:"$PYTHONPATH"}
exec $run_python -c 'from tito.cli import main; main()' "$@"