aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-09-22 12:51:40 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-09-22 13:19:35 +0300
commit6a2538ba9fcd96b9df64f6b9ee77d857d8e173c2 (patch)
treee5ef4a4f0e42e138268f7ab6dc682f1ed6637c8d
parent637cdd6c665570bbc758a22a7929fc32c66a37ac (diff)
downloadydb-6a2538ba9fcd96b9df64f6b9ee77d857d8e173c2.tar.gz
Intermediate changes
-rwxr-xr-xya20
1 files changed, 19 insertions, 1 deletions
diff --git a/ya b/ya
index 9bd45f58225..1b1d61e43a6 100755
--- a/ya
+++ b/ya
@@ -1,7 +1,25 @@
-#!/usr/bin/env python
+#!/usr/bin/env sh
# Please, keep this script in sync with arcadia/ya
+# Shell commands follow
+# Next line is bilingual: it starts a comment in Python, but do nothing in shell
+""":"
+
+# Find a suitable python interpreter
+for cmd in python3 python; do
+ command -v > /dev/null $cmd && exec `command -v $cmd` $0 "$@"
+done
+
+echo "Python interpreter is not found in this system, please, install python" >&2
+
+exit 2
+
+":"""
+# Previous line is bilingual: it ends a comment in Python, but do nothing in shell
+# Shell commands end here
+# Python script follows
+
import os
import sys
import platform