From 57b80cb2e7eb6cf18bbad3a58e20b53712c77f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Kerekes?= Date: Sun, 15 Mar 2020 20:50:01 +0100 Subject: [PATCH] Make release.sh work cross-platform --- release.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 2e86c25..fda590c 100755 --- a/release.sh +++ b/release.sh @@ -2,7 +2,21 @@ set -euo pipefail IFS=$'\n\t' -file=`pwd`/`find out -name *.zip` +OS=`uname -s` + +case $OS in + Linux) + ext=deb + ;; + Darwin) + ext=zip + ;; + *) + ext=exe + ;; +esac + +file=`pwd`/`find out -name *.$ext` basename=`basename $file` if [[ $basename == *"darwin"* ]]; then