-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Linux/MacOS Installations Script Updated #146
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
echo "installing ESP IDF" | ||
|
||
_shell_="${SHELL#${SHELL%/*}/}" | ||
|
||
_sudo(){ | ||
if ! command -v sudo &> /dev/null | ||
then | ||
if ! [ $(id -u) = 0 ]; then | ||
echo "The script need to be run as root." >&2 | ||
exit 1 | ||
fi | ||
"$@" | ||
else | ||
sudo "$@" | ||
fi | ||
} | ||
|
||
# Check whether esp-idf has already been installed | ||
if [ -d $HOME/esp/esp-idf ]; then | ||
echo "You have installed esp-idf" && exit 0 | ||
fi | ||
|
||
unameOut="$(uname -s)" | ||
echo "You have already installed esp-idf!" | ||
else | ||
# System Detection and ESP-IDF Installation | ||
unameOut="$(uname -s)" | ||
case "${unameOut}" in | ||
Linux*) | ||
export DEBIAN_FRONTEND=noninteractive | ||
_sudo apt update && _sudo apt upgrade -y | ||
_sudo apt install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 -y | ||
sudo apt update && sudo apt upgrade -y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, when you removed the |
||
sudo usermod -a -G dialout $USER | ||
sudo apt install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 -y | ||
sudo apt install python3-venv | ||
;; | ||
Darwin*) | ||
if brew --version | grep -q 'Homebrew'; then | ||
|
@@ -43,19 +28,30 @@ case "${unameOut}" in | |
*) echo "Not supported :${unameOut}" | ||
esac | ||
|
||
mkdir -p "$HOME/esp" | ||
pushd "$HOME"/esp || (echo "Error: Cannot Make Directory" && exit 1) | ||
|
||
#ESP Toolchain & ESP-IDF | ||
git clone -b v4.4.3 --recursive https://github.com/espressif/esp-idf.git | ||
pushd esp-idf | ||
./install.sh | ||
popd | ||
popd | ||
|
||
#Check if installation is successfull | ||
. $HOME/esp/esp-idf/export.sh | ||
idf.py --version | (grep "v4.4" && echo "Installation successfull! Please restart your computer for the changes to take effect.") \ | ||
|| (echo "installation failed" && exit 1) | ||
# Create ESP Directory | ||
mkdir -p "$HOME/esp" | ||
pushd "$HOME"/esp || (echo "Error: Cannot Make Directory" && exit 1) | ||
|
||
# Clone ESP-IDF Repository | ||
git clone -b release/v5.1 --recursive https://github.com/espressif/esp-idf.git | ||
cd $HOME/esp/esp-idf | ||
./install.sh esp32 | ||
popd | ||
popd | ||
|
||
# Check if installation is successful | ||
. $HOME/esp/esp-idf/export.sh | ||
idf.py --version | (grep "v5.1.2" && echo "Installation successful! Please restart your computer for the changes to take effect.") \ | ||
|| (echo "Installation failed" && exit 1) | ||
# Set IDF Alias | ||
echo "alias get_idf='. $HOME/esp/esp-idf/export.sh'" >> $HOME/."$_shell_"rc | ||
fi | ||
|
||
echo "alias get_idf='. $HOME/esp/esp-idf/export.sh'" >> $HOME/."$_shell_"rc | ||
# Clone Wall-E repository | ||
if [ ! -d "$HOME/Wall-E" ]; then | ||
cd "$HOME" || (echo "Error: Could not navigate to Home" && exit 1) | ||
echo "Cloning Wall-E" | ||
git clone --recursive https://github.com/SRA-VJTI/Wall-E.git | ||
else | ||
echo "You have already Cloned Wall-E Repository!" | ||
fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?