fix update
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_installed() {
|
||||
[ -f "$HOME/.local/bin/migrate" ]
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Updating Migrate..."
|
||||
local tmp
|
||||
tmp="$(mktemp)"
|
||||
if curl -fsSL -o "$tmp" https://github.com/CyphrRiot/Migrate/raw/main/bin/migrate && [ -s "$tmp" ]; then
|
||||
chmod +x "$tmp"
|
||||
mv "$tmp" "$HOME/.local/bin/migrate"
|
||||
else
|
||||
rm -f "$tmp"
|
||||
echo "Could not download Migrate; keeping the current version."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user