This repository has been archived on 2026-01-10. You can view files and clone it, but cannot push or open issues or pull requests.
coder-templates/alpine.tf.jinja
Steve McMaster f3894b10eb
All checks were successful
continuous-integration/drone/push Build is passing
Update 'alpine.tf.jinja'
2023-02-17 18:13:27 +00:00

32 lines
971 B
Django/Jinja

{% extends "base.tf.jinja" %}
{% block post_startup_script_setup_home %}
# Clone the aports repository
if [ ! -d aports/.git ]; then
git clone https://gitlab.alpinelinux.org/mcm/aports.git
(
cd aports
git pull https://gitlab.alpinelinux.org/alpine/aports.git
git remote set-url origin git@gitlab.alpinelinux.org:mcm/aports.git
)
fi
git config --global user.name "Steve McMaster"
git config --global user.email "steve@mcmaster.io"
# Generate abuild keys if needed
[ -e "$HOME/.abuild/abuild.conf" ] && . $HOME/.abuild/abuild.conf
if [ -n "$PACKAGER_PRIVKEY" ]; then
sudo cp $PACKAGER_PRIVKEY /etc/apk/keys/
else
abuild-keygen -a -i -n
fi
# Update apk
for repo in main community testing ; do
REPO="$HOME/packages/$repo"
grep -q "^$REPO" /etc/apk/repositories || (echo $REPO | sudo tee -a /etc/apk/repositories)
done
sudo apk update
{% endblock %}