From 18e8340a325ad6f068630b8e9ae638c050d294d7 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Fri, 11 Aug 2023 14:28:10 +0200 Subject: [PATCH] Allow target_os to be passed as argument, or to be set as env --- run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run b/run index f879612..b607194 100755 --- a/run +++ b/run @@ -1,11 +1,12 @@ #!/usr/bin/env bash set -e +export target_os="${target_os:=$1}" -if [ "$#" -ne "1" ]; then +if [ "$target_os" = "" ]; then echo "Usage: $0 " exit 1 fi -export target_os="$1" + case "$target_os" in linux) echo "* Compiling: linux ..."