-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(install): add installation guide and scripts
- Add detailed installation instructions for Windows, Linux, and macOS - Create install_unix.sh script for easy Unix-based installation - Update README.md with new installation guide - Update release workflow to use release-please-action v4 - Update CHANGELOG.md with new version 1.1.0 features
- Loading branch information
1 parent
6d725de
commit fb4fd3f
Showing
4 changed files
with
133 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
get_latest_version() { | ||
curl --silent "https://api.github.com/repos/nguyenvanduocit/epubtrans/releases/latest" | | ||
grep '"tag_name":' | | ||
sed -E 's/.*"([^"]+)".*/\1/' | ||
} | ||
|
||
get_os_arch() { | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m) | ||
|
||
case $ARCH in | ||
x86_64) | ||
ARCH="amd64" | ||
;; | ||
aarch64|arm64) | ||
ARCH="arm64" | ||
;; | ||
i386|i686) | ||
ARCH="386" | ||
;; | ||
esac | ||
|
||
echo "${OS}_${ARCH}" | ||
} | ||
|
||
VERSION=$(get_latest_version) | ||
OS_ARCH=$(get_os_arch) | ||
|
||
DOWNLOAD_URL="https://github.com/nguyenvanduocit/epubtrans/releases/download/${VERSION}/epubtrans_${VERSION#v}_${OS_ARCH}.tar.gz" | ||
|
||
echo "Downloading epubtrans ${VERSION} for ${OS_ARCH}..." | ||
curl -L -o epubtrans.tar.gz "$DOWNLOAD_URL" | ||
|
||
echo "Extracting..." | ||
tar -xzf epubtrans.tar.gz | ||
|
||
echo "Installing..." | ||
sudo mv epubtrans /usr/local/bin/ | ||
|
||
echo "Cleaning up..." | ||
rm epubtrans.tar.gz | ||
|
||
echo "epubtrans ${VERSION} has been installed successfully!" |