Compare commits
No commits in common. "dec393595baae1472d003b4bc82c37b2ee182e31" and "742c9f997ef5b2027e5b08ac171c65a6aade4e04" have entirely different histories.
dec393595b
...
742c9f997e
4 changed files with 8 additions and 121 deletions
|
@ -5,7 +5,6 @@ install_dir="${PREFIX:-/usr/local}/bin"
|
||||||
tmp_path="${TMPDIR:-/tmp}"
|
tmp_path="${TMPDIR:-/tmp}"
|
||||||
add_alias=${ALIAS:-0}
|
add_alias=${ALIAS:-0}
|
||||||
nightly=${NIGHTLY:-0}
|
nightly=${NIGHTLY:-0}
|
||||||
debug=${DEBUG:-0}
|
|
||||||
verify=${VERIFY:-0}
|
verify=${VERIFY:-0}
|
||||||
local=${LOCAL:-0}
|
local=${LOCAL:-0}
|
||||||
use_sudo=${USE_SUDO:-0}
|
use_sudo=${USE_SUDO:-0}
|
||||||
|
@ -16,7 +15,6 @@ usage() {
|
||||||
echo
|
echo
|
||||||
echo " -a, --alias Create/update 'f' alias"
|
echo " -a, --alias Create/update 'f' alias"
|
||||||
echo " -n, --nightly Latest nightly build"
|
echo " -n, --nightly Latest nightly build"
|
||||||
echo " -D, --debug Debug build"
|
|
||||||
echo " -d <path>, --dest <path> Set install destination (default /usr/local/bin)"
|
echo " -d <path>, --dest <path> Set install destination (default /usr/local/bin)"
|
||||||
echo " -V, --verify Verify gpg signature"
|
echo " -V, --verify Verify gpg signature"
|
||||||
echo " -l, --local Verify gpg signature with local keychain"
|
echo " -l, --local Verify gpg signature with local keychain"
|
||||||
|
@ -34,10 +32,6 @@ while true; do
|
||||||
nightly=1
|
nightly=1
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-D | --debug)
|
|
||||||
debug=1
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
-d | --dest)
|
-d | --dest)
|
||||||
install_dir=$2
|
install_dir=$2
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -103,14 +97,6 @@ if [ "$nightly" -eq 0 ] && [ "$have_term" -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$debug" -eq 0 ] && [ "$have_term" -eq 1 ]; then
|
|
||||||
printf "do you want to install a debug build? [y/N]: "
|
|
||||||
read -r answer_debug
|
|
||||||
if [ "$answer_debug" = "y" ] || [ "$answer_debug" = "Y" ]; then
|
|
||||||
debug=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$verify" -eq 0 ] && [ "$have_term" -eq 1 ]; then
|
if [ "$verify" -eq 0 ] && [ "$have_term" -eq 1 ]; then
|
||||||
printf "do you want to download and verify the gpg signature? [y/N]: "
|
printf "do you want to download and verify the gpg signature? [y/N]: "
|
||||||
read -r answer_verify
|
read -r answer_verify
|
||||||
|
@ -159,10 +145,6 @@ version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep '"
|
||||||
}
|
}
|
||||||
title="$title $version"
|
title="$title $version"
|
||||||
|
|
||||||
if [ "$debug" -eq 1 ]; then
|
|
||||||
title="$title (debug)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$force_update" -eq 0 ] && [ -e "$install_dir/flow" ]; then
|
if [ "$force_update" -eq 0 ] && [ -e "$install_dir/flow" ]; then
|
||||||
current_version=$(flow --version 2>/dev/null | grep version: | cut -f2 -d ' ')
|
current_version=$(flow --version 2>/dev/null | grep version: | cut -f2 -d ' ')
|
||||||
if [ "$current_version" = "$version" ]; then
|
if [ "$current_version" = "$version" ]; then
|
||||||
|
@ -197,9 +179,6 @@ ext="tar.gz"
|
||||||
if [ "$os" = "windows" ]; then
|
if [ "$os" = "windows" ]; then
|
||||||
ext="zip"
|
ext="zip"
|
||||||
fi
|
fi
|
||||||
if [ "$debug" -eq 1 ]; then
|
|
||||||
filename="$filename-debug"
|
|
||||||
fi
|
|
||||||
url="https://github.com/$repo/releases/download/$version/$filename.$ext"
|
url="https://github.com/$repo/releases/download/$version/$filename.$ext"
|
||||||
|
|
||||||
echo "downloading $title..."
|
echo "downloading $title..."
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
$repo = "neurocyte/flow-nightly"
|
|
||||||
$title = "flow nightly build (debug)"
|
|
||||||
$updater = "install-debug"
|
|
||||||
|
|
||||||
$release = Invoke-RestMethod -Uri "https://api.github.com/repos/$repo/releases/latest"
|
|
||||||
$version = $release.tag_name
|
|
||||||
$title_updater = "$title updater"
|
|
||||||
$install_dir = "$env:APPDATA\flow\bin"
|
|
||||||
|
|
||||||
$existing_flow = Join-Path -Path $install_dir -ChildPath "flow.exe"
|
|
||||||
if (Test-Path $existing_flow) {
|
|
||||||
$existing_version_output = & $existing_flow --version 2>&1 | Out-String
|
|
||||||
$existing_version_lines = $existing_version_output -split "[\r\n]+" | Where-Object { $_ -match '^\s*version:\s*(.+?)\s*$' }
|
|
||||||
if ($existing_version_lines -and $matches) {
|
|
||||||
$existing_version = $matches[1]
|
|
||||||
if ($version -eq $existing_version) {
|
|
||||||
Write-Host "$title is up-to-date (version $version @ $install_dir)"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = "$title $version"
|
|
||||||
|
|
||||||
switch ($env:PROCESSOR_ARCHITECTURE) {
|
|
||||||
"AMD64" { $arch = "x86_64" }
|
|
||||||
"ARM64" { $arch = "aarch64" }
|
|
||||||
default {
|
|
||||||
Write-Host "unknown architecture: $($env:PROCESSOR_ARCHITECTURE)"
|
|
||||||
$LASTEXITCODE = 1
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$filename = "flow-$version-windows-$arch-debug.zip"
|
|
||||||
|
|
||||||
if (-not (Test-Path $install_dir)) {
|
|
||||||
Write-Host "creating installation directory: $install_dir"
|
|
||||||
New-Item -ItemType Directory -Path $install_dir | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "downloading $title..."
|
|
||||||
Invoke-WebRequest -Uri "https://github.com/$repo/releases/download/$version/$filename" -OutFile "$install_dir\$filename"
|
|
||||||
|
|
||||||
echo "installing $title to $install_dir ..."
|
|
||||||
Expand-Archive -Path "$install_dir\$filename" -DestinationPath $install_dir -Force
|
|
||||||
Remove-Item "$install_dir\$filename"
|
|
||||||
|
|
||||||
echo "installing $title_updater to $install_dir\update-flow.ps1 ..."
|
|
||||||
Invoke-WebRequest -Uri "https://flow-control.dev/$updater.ps1" -OutFile "$install_dir\update-flow.ps1"
|
|
||||||
|
|
||||||
echo "$title installed successfully to $install_dir"
|
|
||||||
|
|
||||||
$current_path = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
|
||||||
if ($current_path -notlike "*$install_dir*") {
|
|
||||||
$response = Read-Host "do you want to add $install_dir to your PATH? (y/n)"
|
|
||||||
if ($response -eq "y") {
|
|
||||||
$newPath = "$current_path;$install_dir"
|
|
||||||
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "User")
|
|
||||||
Write-Host "added $install_dir to PATH"
|
|
||||||
Write-Host "close your terminal for changes to take effect"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -36,24 +36,28 @@ Flow Control is under active development, but usually very stable.
|
||||||
|
|
||||||
## 📦 Installation
|
## 📦 Installation
|
||||||
|
|
||||||
### Linux, MacOS and *BSD
|
|
||||||
|
|
||||||
Fetch and install the latest release to `/usr/local/bin` with the installation helper script:
|
Fetch and install the latest release to `/usr/local/bin` with the installation helper script:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -fsSL https://flow-control.dev/install | sh
|
curl -fsSL https://flow-control.dev/install | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or on Windows
|
||||||
|
|
||||||
|
```
|
||||||
|
Invoke-RestMethod "https://flow-control.dev/install.ps1" | Invoke-Expression
|
||||||
|
```
|
||||||
|
|
||||||
Install the latest nightly build:
|
Install the latest nightly build:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly
|
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly
|
||||||
```
|
```
|
||||||
|
|
||||||
with debug symbols:
|
or on Windows
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -fsSL https://flow-control.dev/install | sh -s -- --nightly --debug
|
Invoke-RestMethod "https://flow-control.dev/install-nightly.ps1" | Invoke-Expression
|
||||||
```
|
```
|
||||||
|
|
||||||
See all avalable options for the installer script:
|
See all avalable options for the installer script:
|
||||||
|
@ -70,36 +74,6 @@ sudo chmod +x /usr/local/bin/update-flow
|
||||||
update-flow
|
update-flow
|
||||||
```
|
```
|
||||||
|
|
||||||
At the top of the installer are variables to pre-answer the installation questions.
|
|
||||||
Configure them to your liking.
|
|
||||||
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
For Windows the installer scripts are a little different.
|
|
||||||
|
|
||||||
Fetch and install the latest release to `%AppData%/Roaming/flow/bin`:
|
|
||||||
|
|
||||||
```
|
|
||||||
Invoke-RestMethod "https://flow-control.dev/install.ps1" | Invoke-Expression
|
|
||||||
```
|
|
||||||
|
|
||||||
Install the latest nightly build:
|
|
||||||
|
|
||||||
```
|
|
||||||
Invoke-RestMethod "https://flow-control.dev/install-nightly.ps1" | Invoke-Expression
|
|
||||||
```
|
|
||||||
|
|
||||||
Install the latest nightly build with pdb debug symbol files:
|
|
||||||
|
|
||||||
```
|
|
||||||
Invoke-RestMethod "https://flow-control.dev/install-debug.ps1" | Invoke-Expression
|
|
||||||
```
|
|
||||||
|
|
||||||
The Windows installer will also install itself as `update-flow.ps1` so you can just
|
|
||||||
run `update-flow` in a terminal to update to the latest release or nightly.
|
|
||||||
|
|
||||||
|
|
||||||
### Prebuilt Binaries
|
### Prebuilt Binaries
|
||||||
- Stable: [Releases](https://github.com/neurocyte/flow/releases/latest)
|
- Stable: [Releases](https://github.com/neurocyte/flow/releases/latest)
|
||||||
- Nightly: [Nightly Builds](https://github.com/neurocyte/flow-nightly/releases/latest)
|
- Nightly: [Nightly Builds](https://github.com/neurocyte/flow-nightly/releases/latest)
|
||||||
|
|
|
@ -8,7 +8,6 @@ Site {
|
||||||
"install",
|
"install",
|
||||||
"install.ps1",
|
"install.ps1",
|
||||||
"install-nightly.ps1",
|
"install-nightly.ps1",
|
||||||
"install-debug.ps1",
|
|
||||||
"public.gpg",
|
"public.gpg",
|
||||||
"fonts/AcPlus_IBM_VGA_9x16.ttf",
|
"fonts/AcPlus_IBM_VGA_9x16.ttf",
|
||||||
"fonts/Iosevka-Regular.woff2",
|
"fonts/Iosevka-Regular.woff2",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue