From 62ae37a2fe91232fb6855b48e65f609fff8b448d Mon Sep 17 00:00:00 2001 From: Davide Laezza Date: Sat, 5 May 2018 10:13:44 +0200 Subject: Added python2 fix --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e773930..6a24714 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,9 @@ #!/usr/bin/env bash cd $(dirname $0) -cp ./move-to-next-monitor /usr/local/bin/move-to-next-monitor \ No newline at end of file +if /usr/bin/env python -V 2>&1 | grep 'Python 2' &> /dev/null; then + sed '1c#!/usr/bin/env python3' ./move-to-next-monitor \ + > /usr/local/bin/move-to-next-monitor +else + cp ./move-to-next-monitor /usr/local/bin/move-to-next-monitor +fi -- cgit