-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from cploutarchou/156-update-the-install-script
Modify install script add support for ARM64 cpu
- Loading branch information
Showing
7 changed files
with
130 additions
and
53 deletions.
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,9 +1,19 @@ | ||
### Version 1.0.6 | ||
- Fix install script for MacOS and Linux for ARM architecture | ||
- Fix bug for mailgun api | ||
- Fix bug for sendgrid api | ||
- Fix bug for sendinblue api | ||
- Update README.md | ||
- Update install script | ||
### Version 1.0.5 | ||
- Create Request package | ||
- Fix import issues | ||
- Fix bug in `get` method | ||
- Fix bug in `post` method | ||
- Fix bug in `put` method | ||
### Version 1.0.4 | ||
- Create install script for MacOS | ||
- Fix import issues | ||
### Version 1.0.3 | ||
### Version 1.0.2 | ||
### Version 1.0.1 | ||
### Version 1.0.1 |
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
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,87 @@ | ||
#!/bin/bash | ||
userDir=$USER | ||
echo "MicroGO Installation" | ||
echo " ____ ____ _ ______ ___ " | ||
echo "|_ \ / _| (_) .' ___ | .' \`. " | ||
echo " | \/ | __ .---. _ .--. .--. / .' \_| / .-. \\ " | ||
echo " | |\ /| | [ | / /'\`\\] [ \`/'\`\\ ] / .'\`\\ \ | | ____ | | | | " | ||
echo " _| |_\/_| |_ | | | \\__. | | | \\__. | \\ \`\.___] | \\ \`-' / " | ||
echo "|_____||_____| [___] '.___.' [___] '.__.' \`._____.' \`.___.' " | ||
echo "" | ||
echo "v1.0.6" | ||
echo "Author: Christos Ploutarchou" | ||
echo "Installing MicroGO binaries..." | ||
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.5/microGo | ||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
if grep -q "alias microGo" ~/.zprofile; then | ||
echo "Already exported" | ||
sudo mv microGo /usr/local/bin/microGo | ||
chmod +x /usr/local/bin/microGo | ||
else | ||
sudo mv microGo /usr/local/bin/microGo | ||
chmod +x /usr/local/bin/microGo | ||
echo "export PATH=$PATH:/usr/local/bin/microGo" >>/home/"$userDir"/.bashrc | ||
echo "MicroGO binaries exported to PATH" | ||
source /home/"$userDir"/.bashrc | ||
fi | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
userDir=$USER | ||
|
||
spinner() { | ||
local pid=$1 | ||
local delay=0.75 | ||
# shellcheck disable=SC1003 | ||
local spinstr='|/-\' | ||
# shellcheck disable=SC2143 | ||
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do | ||
local temp=${spinstr#?} | ||
printf " [%c] " "$spinstr" | ||
local spinstr=$temp${spinstr%"$temp"} | ||
sleep $delay | ||
printf "\b\b\b\b\b\b" | ||
done | ||
printf " \b\b\b\b" | ||
} | ||
|
||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
if [[ $(uname -m) == "x86_64" ]]; then | ||
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.6/microGo-MacOS-x86_64 & | ||
spinner $! | ||
mv microGo /Users/"$userDir"/go/bin/microGo | ||
echo "Enter your password to install MicroGO binaries using sudo" | ||
chmod +x /Users/"$userDir"/go/bin/microGo # move to /usr/local/bin/microGo | ||
echo "MicroGO binaries installed" | ||
echo "Export env" | ||
if grep -q "alias microGo" ~/.zprofile; then | ||
echo "Already exported" | ||
else | ||
source ~/.zprofile | ||
comm="alias microGo=/Users/$userDir/go/bin/microGo" | ||
echo $comm >>/Users/"$userDir"/.zprofile # add to .zprofile | ||
echo "MicroGO binaries exported to PATH" | ||
source ~/.zprofile | ||
fi | ||
else | ||
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.6/microGo-MacOS-ARM64 & | ||
spinner $! | ||
mv microGo-MacOS-ARM64 /Users/"$userDir"/go/bin/microGo | ||
fi | ||
|
||
echo "Enter your password to install MicroGO binaries using sudo" | ||
chmod +x /Users/"$userDir"/go/bin/microGo | ||
echo "MicroGO binaries installed" | ||
echo "Export env" | ||
|
||
if grep -q "alias microGo" ~/.zprofile; then | ||
echo "Already exported" | ||
else | ||
# shellcheck disable=SC1090 | ||
source ~/.zprofile | ||
comm="alias microGo=/Users/$userDir/go/bin/microGo" | ||
echo "$comm" >>/Users/"$userDir"/.zprofile | ||
echo "MicroGO binaries exported to PATH" | ||
# shellcheck disable=SC1090 | ||
source ~/.zprofile | ||
fi | ||
|
||
elif [[ "$OSTYPE" == "linux-gnu" ]]; then | ||
if [[ $(uname -m) == "x86_64" ]]; then | ||
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.6/microGo-Linux-x86_64 & | ||
spinner $! | ||
mv microGo-Linux-x86_64 ~/go/bin/microGo | ||
else | ||
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.6/microGo-Linux-ARM64 & | ||
spinner $! | ||
mv microGo-Linux-ARM64 ~/go/bin/microGo | ||
fi | ||
|
||
chmod +x ~/go/bin/microGo | ||
echo "MicroGO binaries installed" | ||
echo "Export env" | ||
|
||
if grep -q "alias microGo" ~/.bashrc; then | ||
echo "Already exported" | ||
else | ||
# shellcheck disable=SC1090 | ||
source ~/.bashrc | ||
comm="alias microGo=~/go/bin/microGo" | ||
echo "$comm" >>~/.bashrc | ||
echo "MicroGO binaries exported to PATH" | ||
# shellcheck disable=SC1090 | ||
source ~/.bashrc | ||
fi | ||
else | ||
echo "Unsupported OS" | ||
echo "Unsupported OS" | ||
fi |
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
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
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
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