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 #!/usr/bin/env bash
set -e set -e
export target_os="${target_os:=$1}"
if [ "$#" -ne "1" ]; then if [ "$target_os" = "" ]; then
echo "Usage: $0 <linux/openbsd>" echo "Usage: $0 <linux/openbsd>"
exit 1 exit 1
fi fi
export target_os="$1"
case "$target_os" in case "$target_os" in
linux) linux)
echo "* Compiling: linux ..." echo "* Compiling: linux ..."