Files
archery/docker/scripts/entrypoint.sh
Cory Sanin b2597a4a01
Some checks failed
App Image CI / Build app image (push) Successful in 28m39s
Docker Image CI / Build build images (arch) (push) Successful in -7s
Docker Image CI / Build build images (artix) (push) Successful in -38s
NPM Audit Check / Check NPM audit (push) Failing after -2m10s
skip cloning if directory exists (aka mounted)
2025-10-25 00:32:49 -05:00

46 lines
820 B
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
}
changeDir() {
if [ -n "$CD" ]
then
cd "$CD"
fi
}
if [ ! -d "/home/user/pkg" ]; then
git clone "$REPO" /home/user/pkg && \
fi
cd /home/user/pkg && \
checkoutCommit && \
applyPatch && \
sudo pacman -Syu --noconfirm --noprogressbar &&\
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
exit $?;