From e8c98ab58e65ee88571656fae0b8b36fd358a8bd Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 7 Jul 2021 16:56:05 +0200 Subject: [PATCH] Update builder scripts Update builder scripts Signed-off-by: Bensuperpc --- tools/build/functions/cmake_fn.sh | 18 ------------------ tools/{build => builder}/cmake.sh | 0 tools/{build => builder}/cmake_all.sh | 0 tools/builder/functions/cmake_fn.sh | 19 +++++++++++++++++++ .../functions/makefile_fn.sh | 8 ++++---- tools/{build => builder}/makefile.sh | 0 tools/{build => builder}/makefile_all.sh | 0 7 files changed, 23 insertions(+), 22 deletions(-) delete mode 100755 tools/build/functions/cmake_fn.sh rename tools/{build => builder}/cmake.sh (100%) rename tools/{build => builder}/cmake_all.sh (100%) create mode 100755 tools/builder/functions/cmake_fn.sh rename tools/{build => builder}/functions/makefile_fn.sh (57%) rename tools/{build => builder}/makefile.sh (100%) rename tools/{build => builder}/makefile_all.sh (100%) diff --git a/tools/build/functions/cmake_fn.sh b/tools/build/functions/cmake_fn.sh deleted file mode 100755 index 17a8fd9..0000000 --- a/tools/build/functions/cmake_fn.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -euo pipefail - -cmake_build () { - local image=$1 - shift 1 - local cmake_arg=$@ - echo "cmake arg: $cmake_arg" - - echo "Pulling dockcross/$image:latest" - docker pull dockcross/$image:latest - echo "Make script dockcross-$image" - docker run --rm dockcross/$image:latest > ./dockcross-$image - chmod +x ./dockcross-$image - echo "Build build-$image" - ./dockcross-$image cmake -Bbuild-$image -H. -GNinja $cmake_arg - ./dockcross-$image ninja -Cbuild-$image -} diff --git a/tools/build/cmake.sh b/tools/builder/cmake.sh similarity index 100% rename from tools/build/cmake.sh rename to tools/builder/cmake.sh diff --git a/tools/build/cmake_all.sh b/tools/builder/cmake_all.sh similarity index 100% rename from tools/build/cmake_all.sh rename to tools/builder/cmake_all.sh diff --git a/tools/builder/functions/cmake_fn.sh b/tools/builder/functions/cmake_fn.sh new file mode 100755 index 0000000..031eeb3 --- /dev/null +++ b/tools/builder/functions/cmake_fn.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -euo pipefail + +cmake_build () { + local image=$1 + local build_file=build-${image%:*} + shift 1 + local cmake_arg=$@ + echo "cmake arg: $cmake_arg" + + echo "Pulling dockcross/$image" + docker pull dockcross/$image + echo "Make script dockcross-$image" + docker run --rm dockcross/$image > ./dockcross-$image + chmod +x ./dockcross-$image + echo "Build $build_file" + ./dockcross-$image cmake -B$build_file -H. -GNinja $cmake_arg + ./dockcross-$image ninja -C$build_file +} diff --git a/tools/build/functions/makefile_fn.sh b/tools/builder/functions/makefile_fn.sh similarity index 57% rename from tools/build/functions/makefile_fn.sh rename to tools/builder/functions/makefile_fn.sh index 0353125..69c0676 100755 --- a/tools/build/functions/makefile_fn.sh +++ b/tools/builder/functions/makefile_fn.sh @@ -5,11 +5,11 @@ makefile_build () { local image=$1 shift 1 - echo "Pulling dockcross/$image:latest" - docker pull dockcross/$image:latest + echo "Pulling dockcross/$image" + docker pull dockcross/$image echo "Make script dockcross-$image" - docker run --rm dockcross/$image:latest > ./dockcross-$image + docker run --rm dockcross/$image > ./dockcross-$image chmod +x ./dockcross-$image - echo "Build build-$image" + echo "Build..." ./dockcross-$image bash -c 'make CXX=$CXX CC=$CC AR=$AR AS=$AS CPP=$CPP FC=$FC' } diff --git a/tools/build/makefile.sh b/tools/builder/makefile.sh similarity index 100% rename from tools/build/makefile.sh rename to tools/builder/makefile.sh diff --git a/tools/build/makefile_all.sh b/tools/builder/makefile_all.sh similarity index 100% rename from tools/build/makefile_all.sh rename to tools/builder/makefile_all.sh