Files
archery/docker/scripts/entrypoint.sh
Cory Sanin 18c0e27da4
All checks were successful
Docker Image CI / Build build images (artix) (push) Successful in -28s
NPM Audit Check / Check NPM audit (push) Successful in -2m11s
App Image CI / Build app image (push) Successful in -1m25s
Docker Image CI / Build build images (arch) (push) Successful in 3s
this is ridiculous now
2025-10-28 17:49:29 -05:00

60 lines
1.1 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() {
if [ -n "$POST" ] && [ -x "./post-entrypoint.sh" ] ; then
echo "EXECUTING POSTENTRY"
./post-entrypoint.sh
else
echo "POST: $POST"
ls -al
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 $?;