summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052025-03-05 04:35:09 +0800
committerzxp198210052025-03-05 04:35:09 +0800
commit77c1f28359fd0027ed15e05d34766e75eb45c1d1 (patch)
tree10a0bf0f7429519b33c32d6c58dbe65aa5bed0e3
parent9692697488f11a3dab5b6fea161676e582142a15 (diff)
downloadaur-77c1f28359fd0027ed15e05d34766e75eb45c1d1.tar.gz
update to fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD28
-rw-r--r--subtitler.sh2
3 files changed, 19 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dda3d270f779..8b92cc00ccf1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = subtitler-bin
- pkgdesc = Quickly download subtitles
+ pkgdesc = Quickly download subtitles.(Prebuilt version.Use system-wide electron)
pkgver = 1.5.5
- pkgrel = 10
+ pkgrel = 11
url = https://s8sachin.github.io/subtitler/
arch = x86_64
license = MIT
@@ -13,6 +13,6 @@ pkgbase = subtitler-bin
source = subtitler.sh
sha256sums = ca37a8487fcf6283b36adcb43de9ebc4a12d7bd2ab96a73a1695f3c2b4d51f81
sha256sums = 61c4ef762e75d209db99b0ddd77c9931c1d966f19d72b5dc1f46e8041f18309c
- sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
pkgname = subtitler-bin
diff --git a/PKGBUILD b/PKGBUILD
index 6f12b4030480..1b0263796068 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@ pkgname=subtitler-bin
_pkgname=Subtitler
pkgver=1.5.5
_electronversion=8
-pkgrel=10
-pkgdesc="Quickly download subtitles"
-arch=("x86_64")
+pkgrel=11
+pkgdesc="Quickly download subtitles.(Prebuilt version.Use system-wide electron)"
+arch=('x86_64')
url="https://s8sachin.github.io/subtitler/"
_ghurl="https://github.com/s8sachin/subtitler"
license=('MIT')
@@ -21,23 +21,25 @@ source=(
)
sha256sums=('ca37a8487fcf6283b36adcb43de9ebc4a12d7bd2ab96a73a1695f3c2b4d51f81'
'61c4ef762e75d209db99b0ddd77c9931c1d966f19d72b5dc1f46e8041f18309c'
- '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
-build() {
- sed -e "s|@electronversion@|${_electronversion}|" \
- -e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@runname@|app.asar|g" \
- -e "s|@cfgdirname@|${_pkgname}|g" \
- -e "s|@options@||g" \
- -i "${srcdir}/${pkgname%-bin}.sh"
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+prepare() {
+ sed -i -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${_pkgname}/g
+ s/@options@//g
+ " "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
- sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ sed -i "s/\/opt\/${_pkgname}\/${pkgname%-bin}/${pkgname%-bin}/g" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${_pkgname}/swiftshader/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/swiftshader"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
- for _icons in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256 512x512 1024x1024;do
+ _icon_sizes=(16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256 512x512 1024x1024)
+ for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
diff --git a/subtitler.sh b/subtitler.sh
index 4cfe3ac09dd8..40e422ca2ee7 100644
--- a/subtitler.sh
+++ b/subtitler.sh
@@ -21,7 +21,7 @@ if [[ -f "${_FLAGS_FILE}" ]]; then
fi
done < "${_FLAGS_FILE}"
fi
-cd "${_APPDIR}"
+cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; }
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@"
else