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-markdown-cil/scripts/setup.sh

32 lines
577 B
Bash
Raw Permalink Normal View History

2022-09-06 03:37:35 +00:00
#!/usr/bin/env sh
# Set up logging.
2022-11-02 22:59:13 +00:00
log() { echo "📦️ $(basename $0): $@"; }
2022-09-06 03:37:35 +00:00
# Normalize our environment.
cd $(dirname $0)/..
# Make sure we have the needed executables installed.
for e in dotnet lefthook prettier nixfmt
do
if ! which $e >& /dev/null
then
log "Cannot find '$e' in the path"
2022-09-06 03:37:35 +00:00
exit 1
fi
done
# Make sure we have lefthook is installed.
if [ ! -f .git/hooks/pre-commit ]
then
log "installing lefthook"
2022-09-06 03:37:35 +00:00
lefthook install
fi
# Make sure our tools are installed.
log "install .NET tools"
2022-09-06 03:37:35 +00:00
dotnet tool restore
# Everything is good.
exit 0