Skip to content

Commit be7b435

Browse files
authored
Merge pull request #3855 from joolswills/builder_fixes
Builder fixes
2 parents fee0add + 3e1be94 commit be7b435

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

scriptmodules/admin/builder.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ function chroot_build_builder() {
102102
local archive_dir="tmp/archives/$(_get_info_image "$dist" "name")"
103103

104104
local distcc_hosts="$__builder_distcc_hosts"
105-
if [[ -d "$rootdir/admin/crosscomp/$dist" ]]; then
106-
rp_callModule crosscomp switch_distcc "$dist"
107-
[[ -z "$distcc_hosts" ]] && distcc_hosts="$ip"
108-
fi
109105

110106
local use_ccache="$__builder_use_ccache"
111107

@@ -127,7 +123,24 @@ function chroot_build_builder() {
127123
mkdir -p "$scriptdir/$archive_dir" "$chroot_rps_dir/$archive_dir"
128124
rsync -av "$scriptdir/$archive_dir/" "$chroot_rps_dir/$archive_dir/"
129125
else
130-
rp_callModule image chroot "$chroot_dir" git -C /home/pi/RetroPie-Setup pull
126+
rp_callModule image chroot "$chroot_dir" bash -c "
127+
cd ~/RetroPie-Setup
128+
git checkout master
129+
git pull
130+
if git remote | grep -q builder; then
131+
git branch -D builder-branch
132+
git remote remove builder
133+
fi
134+
"
135+
# if we have a __builder_repo and __builder_branch set, check out the branch and use that
136+
if [[ -n "$__builder_repo" && "$__builder_branch" ]]; then
137+
rp_callModule image chroot "$chroot_dir" bash -c "
138+
cd ~/RetroPie-Setup
139+
git remote add builder $__builder_repo
140+
git fetch -q builder
141+
git checkout builder/$__builder_branch -b builder-branch
142+
"
143+
fi
131144
fi
132145

133146
for platform in $platforms; do

0 commit comments

Comments
 (0)