#!/usr/bin/env bash
#
# Copyright (c) Facebook, Inc. and its affiliates.

set -e
set -o

git clean -dfX

ENVPATH=`python -m sysconfig | grep -e "^[[:space:]]*base =" | cut -d'"' -f 2`
rm -rfv $ENVPATH/lib/games/nethack
rm -v $ENVPATH/bin/nethack

pushd sys/unix

sh setup.sh hints/macosx-nle

popd

PREFIX=$ENVPATH make -j
PREFIX=$ENVPATH make install
