You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.3 KiB

3 years ago
#!/bin/sh
set -e
set -o pipefail
scheme="$1"
retry() {
retries=$1
shift
count=0
until "$@"; do
exit=$?
wait="$(echo "2^$count" | bc)"
count="$(echo "$count + 1" | bc)"
if [ "$count" -lt "$retries" ]; then
echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep "$wait"
else
echo "Retry $count/$retries exited $exit, no more retries left."
return "$exit"
fi
done
}
3 years ago
# --------custom repos -------
3 years ago
# alpine edit 4 ubuntu
3 years ago
#cp /root/repositories /etc/apk/repositories
3 years ago
3 years ago
echo "==> Install system packages"
apk --no-cache add \
bash \
gnupg \
graphviz \
py-pygments \
python2 \
python3 \
tar \
ttf-freefont \
wget \
make \
xz
# Dependencies needed by latexindent
apk --no-cache add \
git \
libc-dev \
linux-headers
apk --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
add \
perl-file-homedir
#echo "==> Install TeXLive"
extrap=/root/extrapackages
if [ -f $extrap ]; then
while read -r line; do
extrapackages="$extrapackages $line"
done < $extrap
apk --no-cache add $extrapackages
else
echo "No extrapackages file"
fi
echo "==> Update packages"
3 years ago
#npm install -g npm@8.1.3
3 years ago
echo "==> Clean up"
rm -rf \
/root/.gnupg \
/setup.sh \
/extrapackages