install.sh: fix libmpv check, keep old symlink launcher
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
parent
f793fe2695
commit
4e3f38c3f1
1 changed files with 4 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ esac
|
|||
bold "==> Checking requirements"
|
||||
command -v cargo >/dev/null || die "cargo not found — install Rust (https://rustup.rs, or: sudo pacman -S rust)"
|
||||
ok "$(cargo --version)"
|
||||
ldconfig -p 2>/dev/null | grep -q 'libmpv.so' || die "libmpv not found — Arch: sudo pacman -S mpv · Debian/Ubuntu: sudo apt install libmpv-dev · Fedora: sudo dnf install mpv-libs-devel"
|
||||
(/sbin/ldconfig -p 2>/dev/null || ldconfig -p 2>/dev/null) | grep 'libmpv.so' >/dev/null || die "libmpv not found — Arch: sudo pacman -S mpv · Debian/Ubuntu: sudo apt install libmpv-dev · Fedora: sudo dnf install mpv-libs-devel"
|
||||
ok "libmpv"
|
||||
missing=()
|
||||
command -v ffmpeg >/dev/null || missing+=("ffmpeg — visualizer analysis and CD rip encoding")
|
||||
|
|
@ -74,7 +74,9 @@ ok "built $SRC/target/release/mulberry"
|
|||
|
||||
bold "==> Installing"
|
||||
mkdir -p "$BIN" "$APPS" "$(dirname "$ICON")"
|
||||
if [[ -e "$BIN/mulberry" && ! -L "$BIN/mulberry" ]] && ! cmp -s "$BIN/mulberry" "$SRC/target/release/mulberry" && file "$BIN/mulberry" 2>/dev/null | grep -qiE 'python|script|shell'; then
|
||||
if [[ -L "$BIN/mulberry" ]]; then
|
||||
mv "$BIN/mulberry" "$BIN/mulberry.old" && warn "kept your previous launcher as $BIN/mulberry.old"
|
||||
elif [[ -e "$BIN/mulberry" ]] && ! cmp -s "$BIN/mulberry" "$SRC/target/release/mulberry"; then
|
||||
mv "$BIN/mulberry" "$BIN/mulberry.old" && warn "kept your previous launcher as $BIN/mulberry.old"
|
||||
fi
|
||||
install -m755 "$SRC/target/release/mulberry" "$BIN/mulberry" && ok "installed $BIN/mulberry"
|
||||
|
|
|
|||
Loading…
Reference in a new issue