This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/scripts/setup.sh

29 lines
539 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env sh
# Normalize our environment.
cd $(dirname $0)/..
# Make sure we have the needed executables installed.
2023-01-17 04:13:58 +00:00
for e in dotnet lefthook nixfmt
do
if ! which $e >& /dev/null
then
echo "Cannot find '$e' in the path"
exit 1
fi
done
# Make sure we have lefthook is installed.
2022-09-06 04:14:29 +00:00
if [ ! -f .git/hooks/pre-commit ]
then
echo "$(basename $0): installing lefthook"
lefthook install
fi
# Make sure our tools are installed.
2022-09-06 04:14:29 +00:00
echo "$(basename $0): install .NET tools"
dotnet tool restore
# Everything is good.
exit 0