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 +