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 0294e0fb39
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing
update
2022-12-11 14:08:08 -05:00

28 lines
782 B
Django/Jinja

{% extends "base.tf.jinja" %}
{% block post_startup_script_setup_home %}
# Clone the aports repository
if [ ! -d aports ]; then
git clone https://gitlab.alpinelinux.org/mcm/aports.git
(
cd aports
git pull https://gitlab.alpinelinux.org/alpine/aports.git
)
fi
# 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 %