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