Update script

Update script

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-08-26 17:21:22 +02:00
parent d39ef12e3b
commit b437ebca4c

View File

@ -1,8 +1,7 @@
#!/usr/bin/env bash
if (( $# >= 1 )); then
if (( $# >= 2 )); then
image=$1
build_file=build-${image%:*}
shift 1
command=$*
@ -15,7 +14,7 @@ if (( $# >= 1 )); then
docker run --rm dockcross/"$image" > ./dockcross-"$image"
chmod +x ./dockcross-"$image"
echo "Build $build_file"
echo "Run command in dockcross-$image"
./dockcross-"$image" "$command"
else
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <command>"