Support all build parameters in build images

This commit is contained in:
2025-01-14 19:16:50 -05:00
parent c8d0cb2fe1
commit ddbe2d042e
9 changed files with 211 additions and 20 deletions

View File

@@ -1,11 +1,9 @@
#!/bin/sh
if [ -n "$DEP" ]
if [ -n "$DEP" ] && [ "$DEP" != "stable" ]
then
if [ "$DEP" = "testing" ]
then
/scripts/testing.sh
fi
sudo cp "/scripts/pacman.conf/pacman.$DEP.conf" "/etc/pacman.conf" && \
sudo pacman -Syu --noconfirm --noprogressbar
fi
if [ -z "$REPO" ]
@@ -14,9 +12,33 @@ then
exit $?;
fi
checkoutCommit() {
if [ -n "$COMMIT" ]
then
git checkout "$COMMIT"
fi
}
applyPatch() {
if [ -n "$PATCH" ]
then
printf "$PATCH" > ../build.patch && \
patch --strip=1 --input=../build.patch
fi
}
changeDir() {
if [ -n "$CD" ]
then
cd "$CD"
fi
}
# Clone the git repo
git clone "$REPO" /home/user/pkg && \
cd /home/user/pkg && \
checkoutCommit && \
applyPatch && \
sudo pacman -Syu --noconfirm --noprogressbar &&\
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
exit $?;