From 907b1a425a31ef3bb7991e249d0c92ef96645738 Mon Sep 17 00:00:00 2001
From: Aminda Suomalainen <suomalainen+git@mikaela.info>
Date: Tue, 10 Oct 2023 10:14:21 +0300
Subject: [PATCH] add bash/usr-local-bin/meld

---
 bash/usr-local-bin/meld | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 bash/usr-local-bin/meld

diff --git a/bash/usr-local-bin/meld b/bash/usr-local-bin/meld
new file mode 100755
index 0000000..b5c6c6f
--- /dev/null
+++ b/bash/usr-local-bin/meld
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# In case we are on SteamOS?
+#set -x
+# The usual system-wide installation
+if [ -f /usr/bin/meld ]; then
+	/usr/bin/meld $@
+# System-wide flatpak
+elif [ -f /var/lib/flatpak/exports/bin/org.gnome.meld ]; then
+	flatpak run org.gnome.meld $@
+# User-specific flatpak
+elif [ -f ~/.local/share/flatpak/exports/bin/org.gnome.meld ]; then
+	flatpak run --user org.gnome.meld $@
+# If not found.
+else
+	printf "meld doesn't seem to be installed :("
+fi
+#set +x