mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-23 00:54:26 +01:00
Update script
Update script Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
d39ef12e3b
commit
b437ebca4c
@ -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=$*
|
||||||
@ -15,7 +14,7 @@ if (( $# >= 1 )); then
|
|||||||
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>"
|
||||||
|
Loading…
Reference in New Issue
Block a user