From 9862a7bade613e225f8cb7ed7fe268cd8e0c4848 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Mon, 31 Jan 2022 15:21:30 +0100 Subject: [PATCH] Detect python version --- ssh-wrapper.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ssh-wrapper.py b/ssh-wrapper.py index e911629..d7129bb 100755 --- a/ssh-wrapper.py +++ b/ssh-wrapper.py @@ -1,4 +1,11 @@ -#!/usr/bin/env python3 +#!/bin/sh +'''': +for pyint in python3 python python2; do + which $pyint >/dev/null 2>&1 && exec $pyint "$0" "$@" +done +echo "$0: No python could be found" >&2 +exit 1 +# ''' import argparse import os