Added helping scripts

This commit is contained in:
madzik 2024-11-12 11:53:59 +00:00
parent 7bf6dee8db
commit d5178ccac7
2 changed files with 18 additions and 0 deletions

9
build_all_packages.sh Executable file
View File

@ -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

9
build_package.sh Executable file
View File

@ -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