new builder
This commit is contained in:
parent
70d53340c6
commit
97373f61ab
40
builder-chroot
Executable file
40
builder-chroot
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
# A simple script to build packages into multiple repos
|
||||
|
||||
err() { echo "$1" >&2; }
|
||||
|
||||
build_pkg() {
|
||||
local makepkg_output makepkg_exit_code makepkg_status
|
||||
|
||||
package="$1"
|
||||
repo="$2"
|
||||
|
||||
[[ -d "${cfg_repos_dir}/${repo}" ]] || {
|
||||
echo "Creating ${cfg_repos_dir}/${repo}"
|
||||
mkdir -p "${cfg_repos_dir}/${repo}" || {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
echo -n "Building ${repo}/${package}... "
|
||||
|
||||
cd "/tmp/build-${package}"
|
||||
sudo /usr/local/bin/makepkg-chroot.sh "${cfg_build_dir}/${package}.chroot" "${cfg_repos_dir}/${repo}"
|
||||
}
|
||||
|
||||
main() {
|
||||
source 'builder-chroot.cfg'
|
||||
|
||||
package="$1"
|
||||
repo_name="$2"
|
||||
|
||||
build_pkg "$package" "$repo_name"
|
||||
repo-add -n "${repo_name}.db.tar.gz" "$package"*.pkg.tar.xz
|
||||
|
||||
for i in "${repos[@]}"; do
|
||||
cd "${cfg_repos_dir}/${i}"
|
||||
repo-add -n "${i}.db.tar.gz" *.pkg.tar.xz
|
||||
done
|
||||
}
|
||||
|
||||
main
|
9
builder-chroot.cfg
Executable file
9
builder-chroot.cfg
Executable file
|
@ -0,0 +1,9 @@
|
|||
# The config for building packages in chroots
|
||||
|
||||
cfg_git_repo="$HOME/git/pkgbuilds.git"
|
||||
|
||||
cfg_build_dir="/tmp"
|
||||
cfg_repos_dir="$HOME/public"
|
||||
cfg_chroot_dir="/tmp/chroot"
|
||||
|
||||
export GIT_DIR='.git'
|
Loading…
Reference in New Issue
Block a user