#!/bin/sh # Usage: ./Cleanup fatal() { echo "fatal: $*" >&2 exit 1 } run() { "$@" || fatal "could not run: $*" } [ -d "./git" ] && fatal "must be run from parent directory" run sh ./tools/format run rm -rf .cache run rm -f compile_commands.json run make distclean echo "done."