#!/bin/bash

# Usage:
# bash <(curl -s https://scripts.justman10000.de/installers/bind9.sh)

mkdir /home/jemalloc
cd /home/jemalloc
git init
git pull https://github.com/jemalloc/jemalloc
autoreconf -fi
bash configure
make install
rm -r /home/jemalloc

cat << EOF >> /root/.bashrc

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
EOF

. /root/.bashrc

mkdir /home/bind9
cd /home/bind9
git init
git pull https://gitlab.isc.org/isc-projects/bind9
autoreconf -fi
bash configure
make install
rm -r /home/bind9