Files
Earle LoweandGitHub e07d1eb5de Use #!/usr/bin/env bash (#18762)
* Use #!/usr/bin/env bash

* Update setup-poetry.sh

* Use #!/usr/bin/env bash for shebang

* fix up typo for leading space

* For consistency fix up a few other scripts
2024-11-04 15:22:52 -07:00

26 lines
913 B
Bash

#!/usr/bin/env bash
# Cleans up files/directories that may be left over from previous runs for a clean slate before starting a new build
set -o errexit
PWD=$(pwd)
rm -rf ../venv || true
rm -rf venv || true
rm -rf chia_blockchain.egg-info || true
rm -rf build_scripts/final_installer || true
rm -rf build_scripts/dist || true
rm -rf build_scripts/pyinstaller || true
rm -rf chia-blockchain-gui/build || true
rm -rf chia-blockchain-gui/daemon || true
rm -rf chia-blockchain-gui/node_modules || true
rm chia-blockchain-gui/temp.json || true
(cd "$PWD/chia-blockchain-gui" && git checkout HEAD -- package-lock.json) || true
cd "$PWD" || true
# Clean up old globally installed node_modules that might conflict with the current build
rm -rf /opt/homebrew/lib/node_modules || true
# Clean up any installed versions of node so we can start fresh
brew list | grep "^node\@\|^node$" | xargs -L1 brew uninstall || true