forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·38 lines (32 loc) · 855 Bytes
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -eu
export CLEAN=${1:-}
cd "$(dirname "$0")"
# Remove all untracked files and directories.
if [ -n "$CLEAN" ]; then
if [ "$CLEAN" = "clean" ]; then
echo "WARNING: This will erase *all* untracked files, including hooks and submodules."
echo -n "Continue? [y/n] "
read user_input
if [ "$user_input" != "y" ] && [ "$user_input" != "Y" ]; then
exit 1
fi
rm -rf .git/hooks/*
git clean -fd
for SUBMODULE in $(git config --file .gitmodules --get-regexp path | awk '{print $2}'); do
rm -rf $SUBMODULE
done
git submodule update --init --recursive
exit 0
else
echo "Unknown command: $CLEAN"
exit 1
fi
fi
git submodule update --init --recursive
if [ ! -f ~/.nvm/nvm.sh ]; then
echo "Nvm not found at ~/.nvm"
exit 1
fi
circuits/cpp/bootstrap.sh
yarn-project/bootstrap.sh