Skip to content

Commit

Permalink
fix: fix installation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
metafates committed Sep 14, 2022
1 parent 7048eed commit 6478c1a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to
[Semantic Versioning](https://semver.org).

## 3.8.1

- Fix installation method detection
- Fix install script

## 3.8.0

- Support for more manga metadata fields such as summary, genres, tags, and more.
Expand Down
2 changes: 1 addition & 1 deletion constant/build.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package constant

const Version = "3.8.0"
const Version = "3.8.1"

var (
BuiltAt = "Unknown"
Expand Down
8 changes: 7 additions & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,13 @@ install_binary() {

tar -xf "$TAR_FILE" -C "$TMPDIR"

OUT="/usr/bin/"
if [ -d "/usr/local/bin/" ];
then
OUT="/usr/local/bin/"
else
OUT="/usr/bin/"
fi

info "Moving to ${OUT}"
sudo sh -c "install '$TMPDIR/$FILE_BASENAME' '${OUT}'"
install_completions "$TMPDIR/completions"
Expand Down
2 changes: 1 addition & 1 deletion updater/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func DetectInstallationMethod() InstallationMethod {
return Unknown
}

if path == "/usr/local/bin/"+constant.Mangal {
if path == "/usr/local/bin/"+constant.Mangal || path == "/usr/bin/"+constant.Mangal {
return Script
}
}
Expand Down

0 comments on commit 6478c1a

Please sign in to comment.