Update scripts

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-10-13 19:44:08 +02:00
parent c994e33650
commit 749fb64f2d
4 changed files with 24 additions and 17 deletions

View File

@ -1,5 +1,6 @@
FROM dockcross/base:latest FROM dockcross/base:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
# This is for ARMv5 "legacy" (armel) devices which do NOT support hard float # This is for ARMv5 "legacy" (armel) devices which do NOT support hard float
# VFP instructions (armhf). # VFP instructions (armhf).

View File

@ -1,15 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if (( $# >= 1 )); then if (( $# >= 1 )); then
image=$1 image_complet=$1
build_file=build-${image%:*} image=${image_complet%:*}
tag=${image_complet#*:}
build_file=build-$image
shift 1 shift 1
cmake_arg=$@ cmake_arg=$*
echo "cmake arg: $cmake_arg" echo "cmake arg: $cmake_arg"
#echo "Pulling dockcross/$image" echo "Pulling dockcross/$image"
#docker pull dockcross/"$image" docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image" echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image" docker run --rm dockcross/"$image" > ./dockcross-"$image"
@ -19,6 +21,6 @@ if (( $# >= 1 )); then
./dockcross-"$image" cmake -B "$build_file" -S . -G Ninja $cmake_arg ./dockcross-"$image" cmake -B "$build_file" -S . -G Ninja $cmake_arg
./dockcross-"$image" ninja -C "$build_file" ./dockcross-"$image" ninja -C "$build_file"
else else
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <cmake arg.>" echo "Usage: ${0##*/} <docker image (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <cmake arg.>"
exit 1 exit 1
fi fi

View File

@ -1,14 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if (( $# >= 2 )); then if (( $# >= 2 )); then
image=$1 image_complet=$1
image=${image_complet%:*}
tag=${image_complet#*:}
shift 1 shift 1
command=$@ command=$*
echo "command: $command" echo "command: $command"
#echo "Pulling dockcross/$image" echo "Pulling dockcross/$image"
#docker pull dockcross/"$image" docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image" echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image" docker run --rm dockcross/"$image" > ./dockcross-"$image"

View File

@ -1,15 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if (( $# >= 1 )); then if (( $# >= 1 )); then
image=$1 image_complet=$1
build_file=build-${image%:*} image=${image_complet%:*}
tag=${image_complet#*:}
build_file=build-$image
shift 1 shift 1
make_arg=$@ make_arg=$*
echo "make arg: $make_arg" echo "make arg: $make_arg"
#echo "Pulling dockcross/$image" echo "Pulling dockcross/$image"
#docker pull dockcross/"$image" docker pull "dockcross/$image:$tag"
echo "Make script dockcross-$image" echo "Make script dockcross-$image"
docker run --rm dockcross/"$image" > ./dockcross-"$image" docker run --rm dockcross/"$image" > ./dockcross-"$image"
@ -18,6 +20,6 @@ if (( $# >= 1 )); then
echo "Build $build_file" echo "Build $build_file"
./dockcross-"$image" bash -c 'make CXX=${CXX} CC=${CC} AR=${AR} AS=${AS} LD=${LD} CPP=${CPP} FC=${FC} '"$make_arg" ./dockcross-"$image" bash -c 'make CXX=${CXX} CC=${CC} AR=${AR} AS=${AS} LD=${LD} CPP=${CPP} FC=${FC} '"$make_arg"
else else
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <make arg.>" echo "Usage: ${0##*/} <docker image (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <make arg.>"
exit 1 exit 1
fi fi