Last active
May 16, 2022 04:23
-
-
Save WesleyCh3n/54aa9fa5e31bf861bea0ee50ccf9ea89 to your computer and use it in GitHub Desktop.
Analyze install script
This file contains hidden or 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
Write-Host @' | |
Downloading fuan analyze... | |
'@ | |
$root_dir = "fuan.analyze" | |
if (Test-Path $root_dir) { | |
Remove-Item $root_dir -Force -Recurse | |
} | |
$url = "https://github.com/WesleyCh3n/analyze.api/releases/download/latest/analyze.api-x86_64-pc-windows-msvc.zip" | |
Invoke-WebRequest -OutFile analyze_api.zip $url | |
Expand-Archive analyze_api.zip -DestinationPath ./$root_dir/ | |
$url = "https://github.com/WesleyCh3n/analyze.rs/releases/download/latest/analyze.rs-x86_64-pc-windows-msvc.zip" | |
Invoke-WebRequest -OutFile analyze_rs.zip $url | |
Expand-Archive analyze_rs.zip -DestinationPath ./$root_dir/ | |
New-Item -Path "./$root_dir/bin" -ItemType "directory" | Out-Null | |
Move-Item -Path "./$root_dir/analyze-rs.exe" -Destination "./$root_dir/bin/analyze-rs.exe" | |
$url = "https://github.com/WesleyCh3n/analyze.web/releases/download/latest/analyze.web-static.tar.gz" | |
Invoke-WebRequest -OutFile analyze_web.tar.gz $url | |
tar -xf analyze_web.tar.gz -C ./$root_dir/assets/ | |
Remove-Item analyze*.zip | |
Remove-Item analyze*.tar.gz | |
Write-Host @' | |
Finished! | |
'@ | |
Write-Host -ForegroundColor Green @' | |
Go to `fuan.analyze` folder and open analyze-api.exe. | |
Then, go to `localhost:3001` in the browsJer. | |
'@ |
This file contains hidden or 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
printf "Downloading fuan analyze...\n" | |
ROOT_DIR="fuan.analyze" | |
rm -rf $ROOT_DIR | |
mkdir -p $ROOT_DIR/bin | |
url="https://github.com/WesleyCh3n/analyze.api/releases/download/latest/analyze.api-x86_64-unknown-linux-gnu.tar.gz" | |
curl '-#' -fLO $url | |
tar xf analyze.api-x86_64-unknown-linux-gnu.tar.gz -C $ROOT_DIR | |
url="https://github.com/WesleyCh3n/analyze.rs/releases/download/latest/analyze.rs-x86_64-unknown-linux-gnu.tar.gz" | |
curl '-#' -fLO $url | |
tar xf analyze.rs-x86_64-unknown-linux-gnu.tar.gz -C $ROOT_DIR | |
mv $ROOT_DIR/analyze-rs $ROOT_DIR/bin/ | |
url="https://github.com/WesleyCh3n/analyze.web/releases/download/latest/analyze.web-static.tar.gz" | |
curl '-#' -fLO $url | |
tar xf analyze.web-static.tar.gz -C $ROOT_DIR/assets/ | |
rm analyze*.tar.gz | |
printf "Finished!!\n\n" | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
printf "${GREEN}Go to fuan.analyze folder and execute analyze-api | |
Then, go to localhost:3001 in the browser.${NC}\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Linux Terminal
curl -sSL https://gist.github.com/WesleyCh3n/54aa9fa5e31bf861bea0ee50ccf9ea89/raw/install.sh | sh