futrou 2.0.4 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/futrou-darwin-amd64 +0 -0
- package/bin/futrou-darwin-arm64 +0 -0
- package/bin/futrou-freebsd-amd64 +0 -0
- package/bin/futrou-freebsd-arm64 +0 -0
- package/bin/futrou-linux-amd64 +0 -0
- package/bin/futrou-linux-arm64 +0 -0
- package/bin/futrou-windows-amd64.exe +0 -0
- package/bin/futrou-windows-arm64.exe +0 -0
- package/install.ps1 +10 -3
- package/install.sh +28 -9
- package/package.json +1 -1
package/bin/futrou-darwin-amd64
CHANGED
|
Binary file
|
package/bin/futrou-darwin-arm64
CHANGED
|
Binary file
|
package/bin/futrou-freebsd-amd64
CHANGED
|
Binary file
|
package/bin/futrou-freebsd-arm64
CHANGED
|
Binary file
|
package/bin/futrou-linux-amd64
CHANGED
|
Binary file
|
package/bin/futrou-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/install.ps1
CHANGED
|
@@ -83,10 +83,12 @@ if ($CurrentVersion -and $Version -ne "latest") {
|
|
|
83
83
|
|
|
84
84
|
$DisplayVersion = if ($Version -eq "latest") { "latest" } else { $Version.TrimStart('v') }
|
|
85
85
|
|
|
86
|
+
$DisplayVersionLabel = if ($Version -eq "latest") { "latest" } else { "v$DisplayVersion" }
|
|
87
|
+
|
|
86
88
|
if ($CurrentVersion) {
|
|
87
|
-
Write-Info "$Action Futrou CLI v$CurrentVersion →
|
|
89
|
+
Write-Info "$Action Futrou CLI v$CurrentVersion → $DisplayVersionLabel"
|
|
88
90
|
} else {
|
|
89
|
-
Write-Info "Installing Futrou CLI
|
|
91
|
+
Write-Info "Installing Futrou CLI $DisplayVersionLabel"
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
# ---------------------------------------------------------------------------
|
|
@@ -182,5 +184,10 @@ if (-not $NoPathUpdate) {
|
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
186
|
|
|
187
|
+
# Make futrou available in the current session without restarting
|
|
188
|
+
if ($env:PATH -notlike "*$BinDir*") {
|
|
189
|
+
$env:PATH = "$BinDir;$env:PATH"
|
|
190
|
+
}
|
|
191
|
+
|
|
185
192
|
Write-Output ""
|
|
186
|
-
Write-Output "To get started,
|
|
193
|
+
Write-Output "To get started, run: futrou --help"
|
package/install.sh
CHANGED
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
# On Windows under Git Bash / MINGW, delegate to PowerShell
|
|
5
5
|
if [[ ${OS:-} = Windows_NT ]]; then
|
|
6
6
|
if [[ ${MSYSTEM:-} != MINGW64* ]]; then
|
|
7
|
-
powershell -c "irm https://
|
|
7
|
+
powershell -c "irm https://futrou.com/install.ps1 | iex"
|
|
8
8
|
exit $?
|
|
9
9
|
fi
|
|
10
10
|
fi
|
|
@@ -131,28 +131,39 @@ elif [[ -n "$current_version" ]]; then
|
|
|
131
131
|
fi
|
|
132
132
|
|
|
133
133
|
display_version="${version#v}"
|
|
134
|
-
[[ $version == "latest" ]] && display_version="latest"
|
|
135
134
|
|
|
136
135
|
if [[ -n "$current_version" ]]; then
|
|
137
|
-
|
|
136
|
+
if [[ $version == "latest" ]]; then
|
|
137
|
+
info "$action Futrou CLI v$current_version → latest"
|
|
138
|
+
else
|
|
139
|
+
info "$action Futrou CLI v$current_version → v$display_version"
|
|
140
|
+
fi
|
|
138
141
|
else
|
|
139
|
-
|
|
142
|
+
if [[ $version == "latest" ]]; then
|
|
143
|
+
info "Installing Futrou CLI latest"
|
|
144
|
+
else
|
|
145
|
+
info "Installing Futrou CLI v$display_version"
|
|
146
|
+
fi
|
|
140
147
|
fi
|
|
141
148
|
|
|
142
149
|
# ---------------------------------------------------------------------------
|
|
143
|
-
# Download
|
|
150
|
+
# Download to a temp file then atomically replace (avoids "Text file busy"
|
|
151
|
+
# when upgrading a running binary)
|
|
144
152
|
# ---------------------------------------------------------------------------
|
|
153
|
+
tmp_exe="$bin_dir/.futrou-tmp$exe_ext"
|
|
154
|
+
|
|
145
155
|
if command -v curl >/dev/null 2>&1; then
|
|
146
|
-
curl --fail --location --progress-bar --output "$
|
|
156
|
+
curl --fail --location --progress-bar --output "$tmp_exe" "$download_url" ||
|
|
147
157
|
error "Failed to download from \"$download_url\""
|
|
148
158
|
elif command -v wget >/dev/null 2>&1; then
|
|
149
|
-
wget -q --show-progress -O "$
|
|
159
|
+
wget -q --show-progress -O "$tmp_exe" "$download_url" ||
|
|
150
160
|
error "Failed to download from \"$download_url\""
|
|
151
161
|
else
|
|
152
162
|
error "curl or wget is required to install Futrou CLI"
|
|
153
163
|
fi
|
|
154
164
|
|
|
155
|
-
chmod +x "$
|
|
165
|
+
chmod +x "$tmp_exe"
|
|
166
|
+
mv -f "$tmp_exe" "$exe"
|
|
156
167
|
|
|
157
168
|
# ---------------------------------------------------------------------------
|
|
158
169
|
# Verify
|
|
@@ -160,7 +171,12 @@ chmod +x "$exe"
|
|
|
160
171
|
installed_version=$("$exe" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
|
|
161
172
|
[[ -z $installed_version ]] && error "Downloaded binary failed to run"
|
|
162
173
|
|
|
163
|
-
|
|
174
|
+
case $action in
|
|
175
|
+
Upgrading) action_past="upgraded" ;;
|
|
176
|
+
Downgrading) action_past="downgraded" ;;
|
|
177
|
+
*) action_past="installed" ;;
|
|
178
|
+
esac
|
|
179
|
+
success "Futrou CLI v$installed_version $action_past to $exe"
|
|
164
180
|
|
|
165
181
|
# ---------------------------------------------------------------------------
|
|
166
182
|
# PATH setup (skip if already in PATH)
|
|
@@ -244,3 +260,6 @@ esac
|
|
|
244
260
|
echo
|
|
245
261
|
info "To get started, run:"
|
|
246
262
|
info_bold " futrou --help"
|
|
263
|
+
|
|
264
|
+
# Make futrou available in the current shell session without restarting
|
|
265
|
+
export PATH="$bin_dir:$PATH"
|