This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
launcher_source=${BASH_SOURCE[0]}
|
||||
while [[ -L "$launcher_source" ]]; do
|
||||
launcher_dir=$(cd "$(dirname "$launcher_source")" && pwd)
|
||||
launcher_target=$(readlink "$launcher_source")
|
||||
if [[ "$launcher_target" = /* ]]; then
|
||||
launcher_source="$launcher_target"
|
||||
else
|
||||
launcher_source="$launcher_dir/$launcher_target"
|
||||
fi
|
||||
done
|
||||
|
||||
script_dir=$(cd "$(dirname "$launcher_source")" && pwd)
|
||||
repo_dir=$(cd "$script_dir/.." && pwd)
|
||||
python_bin="$repo_dir/.venv/bin/python"
|
||||
|
||||
if [[ ! -x "$python_bin" ]]; then
|
||||
echo "Cowork Local is not installed. Run $repo_dir/scripts/install_local.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$(dirname "$repo_dir")"
|
||||
exec "$python_bin" -m cowork_local "$@"
|
||||
Reference in New Issue
Block a user