# Exit on error:
set -e

wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.xz
tar xf ghostscript-9.56.1.tar.xz
cd ghostscript-9.56.1
sed -i.orig 's,=/usr/local,=,' configure
./configure --prefix=
make install
cd ..
rm -rf ghostscript-9.56.1
rm ghostscript-9.56.1.tar.xz

exit 0
