From 94c24fdb4995ca58177145a9f5826a9e98e1b0a3 Mon Sep 17 00:00:00 2001 From: wheaney <42350981+wheaney@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:54:15 -0700 Subject: [PATCH] Update how we're checking for python3 during setup, update the python script's shebang --- gnome/bin/setup | 14 +++++++++----- ui/src/breezydesktop.in | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gnome/bin/setup b/gnome/bin/setup index bb97149..1bf0fb2 100755 --- a/gnome/bin/setup +++ b/gnome/bin/setup @@ -3,17 +3,21 @@ set -e check_command() { - if ! command -v "$1" &>/dev/null; then - echo "Please install \"$1\" and make sure it's available in your \$PATH, then rerun the setup." - exit 1 - fi + for cmd in "$@"; do + if command -v "$cmd" &>/dev/null; then + return + fi + done + + echo "Please install one of the following: ${*}, and make sure it's available in your \$PATH, then rerun the setup." + exit 1 } check_command "gnome-extensions" check_command "glib-compile-schemas" check_command "update-desktop-database" check_command "gtk-update-icon-cache" -check_command "python" +check_command "python" "python3" # This script gets packaged with the release and should do the bulk of the setup work. This allows this setup to be tied # to a specific release of the code, and guarantees it will never run along-side newer or older binaries. diff --git a/ui/src/breezydesktop.in b/ui/src/breezydesktop.in index bbd44d3..2729644 100755 --- a/ui/src/breezydesktop.in +++ b/ui/src/breezydesktop.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!/usr/bin/env python3 # breezydesktop.in #