Allow target_os to be passed as argument, or to be set as env

This commit is contained in:
Fierelier 2023-08-11 14:28:10 +02:00
parent 3edb470da5
commit 18e8340a32

5
run
View File

@ -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 <linux/openbsd>"
exit 1
fi
export target_os="$1"
case "$target_os" in
linux)
echo "* Compiling: linux ..."