20 lines
423 B
Bash
Executable File
20 lines
423 B
Bash
Executable File
#!/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
|
|
}
|