From d5178ccac7eb538e7231d747e7f9c4f32642bc80 Mon Sep 17 00:00:00 2001 From: madzik Date: Tue, 12 Nov 2024 11:53:59 +0000 Subject: [PATCH] Added helping scripts --- build_all_packages.sh | 9 +++++++++ build_package.sh | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100755 build_all_packages.sh create mode 100755 build_package.sh diff --git a/build_all_packages.sh b/build_all_packages.sh new file mode 100755 index 0000000..b664148 --- /dev/null +++ b/build_all_packages.sh @@ -0,0 +1,9 @@ +#!/bin/bash +home_dir=$PWD +echo $home_dir +find . -type f -name Dockerfile | while read -r file_path; do + dir_path=$(dirname "$file_path") + file_name=$(echo $dir_path | cut -d'/' -f3- | sed 's|/|_|g') + docker build -t "$file_name" $dir_path + docker run -v `pwd`:/home/rublon-ssh/ $file_name /bin/bash /home/rublon-ssh/build_project.sh $file_name +done diff --git a/build_package.sh b/build_package.sh new file mode 100755 index 0000000..2b6e540 --- /dev/null +++ b/build_package.sh @@ -0,0 +1,9 @@ +#!/bin/bash +cmake -B rublon_ssh-build /home/rublon-ssh/ +cmake --build rublon_ssh-build/ +cmake --build rublon_ssh-build/ --target package +if [ ! -d /home/rublon-ssh/$1_packages ]; then + mkdir /home/rublon-ssh/$1_packages +fi +cp rublon_ssh-build/*rpm /home/rublon-ssh/$1_packages 2>/dev/null || cp rublon_ssh-build/*deb /home/rublon-ssh/$1_packages 2>/dev/null +