Files
archery/docker/scripts/entrypoint.sh
Cory Sanin d34b41b899
Some checks failed
App Image CI / Build app image (push) Has been cancelled
Docker Image CI / Build build images (arch) (push) Has been cancelled
NPM Audit Check / Check NPM audit (push) Successful in -2m11s
Docker Image CI / Build build images (artix) (push) Successful in -26s
debugging gitea's poor handling of actions
2025-10-28 17:35:56 -05:00

58 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
if [ -n "$DEP" ] && [ "$DEP" != "stable" ]
then
sudo cp "/scripts/pacman.conf/pacman.$DEP.conf" "/etc/pacman.conf" && \
sudo pacman -Syu --noconfirm --noprogressbar
fi
if [ -z "$REPO" ]
then
/bin/bash
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
}
postEntrypoint() {
ls -al
if [ -n "$POST" ] && [ -x post-entrypoint.sh ] ; then
echo "EXECUTING POSTENTRY"
./post-entrypoint.sh
fi
}
changeDir() {
if [ -n "$CD" ]
then
cd "$CD"
fi
}
DIR="${WORKSPACE:-/home/user/pkg}"
if [ ! -d "$DIR" ]; then
git clone "$REPO" "$DIR" || exit $?
fi
cd "$DIR" && \
touch archery && \
checkoutCommit && \
applyPatch && \
sudo pacman -Syu --noconfirm --noprogressbar &&\
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive && \
postEntrypoint
exit $?;