summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052025-04-14 17:19:05 +0800
committerzxp198210052025-04-14 17:19:05 +0800
commitd10e89acf13cfedb095d4eaf48bbdcf361585ee9 (patch)
treefc403f3a0b4b28b7ed76b9bc6dcfe4835c5838c4
parentc67097457bc38635049157a3aa78d56921741ec1 (diff)
downloadaur-boostchanger-bin.tar.gz
update to fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD25
-rw-r--r--boostchanger.sh2
3 files changed, 17 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b8a43251a032..60988c0bd47b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = boostchanger-bin
- pkgdesc = With this app you can control CPU turbo boost and the settings of the cpu speed in order to consuming less battery voltage on Linux
+ pkgdesc = With this app you can control CPU turbo boost and the settings of the cpu speed in order to consuming less battery voltage on Linux.(Prebuilt version.Use system-wide electron)
pkgver = 5.0.3
- pkgrel = 10
+ pkgrel = 11
url = https://github.com/nbebaw/boostchanger
arch = x86_64
license = MIT
@@ -14,6 +14,6 @@ pkgbase = boostchanger-bin
source = boostchanger.sh
sha256sums = 4f9d2239359802b2f0e3662556114a2c48a9f232064d6356f1a1501c7dd91726
sha256sums = af8aec94b8f5c88f4c4e4435570b94d143970c621048db7e25f27403fa4ec02e
- sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
pkgname = boostchanger-bin
diff --git a/PKGBUILD b/PKGBUILD
index fe60e1b7116e..99504798dff1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=boostchanger-bin
pkgver=5.0.3
_electronversion=25
-pkgrel=10
-pkgdesc="With this app you can control CPU turbo boost and the settings of the cpu speed in order to consuming less battery voltage on Linux"
+pkgrel=11
+pkgdesc="With this app you can control CPU turbo boost and the settings of the cpu speed in order to consuming less battery voltage on Linux.(Prebuilt version.Use system-wide electron)"
arch=('x86_64')
url="https://github.com/nbebaw/boostchanger"
license=('MIT')
@@ -22,17 +22,18 @@ source=(
)
sha256sums=('4f9d2239359802b2f0e3662556114a2c48a9f232064d6356f1a1501c7dd91726'
'af8aec94b8f5c88f4c4e4435570b94d143970c621048db7e25f27403fa4ec02e'
- '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
-build() {
- sed -e "s|@electronversion@|${_electronversion}|g" \
- -e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@runname@|app.asar|g" \
- -e "s|@cfgdirname@|${pkgname%-bin}|g" \
- -e "s|@options@||g" \
- -i "${srcdir}/${pkgname%-bin}.sh"
- sed "s|/opt/${pkgname%-bin}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+prepare() {
+ sed -i -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${pkgname%-bin}/g
+ s/@options@//g
+ " "${srcdir}/${pkgname%-bin}.sh"
+ sed -i "s/\/opt\/${pkgname%-bin}\///g" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
asar e "${srcdir}/opt/${pkgname%-bin}/resources/app.asar" "${srcdir}/app.asar.unpacked"
- sed "/openDevTools/d" -i "${srcdir}/app.asar.unpacked/src/main.js"
+ sed -i "/openDevTools/d" "${srcdir}/app.asar.unpacked/src/main.js"
asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
}
package() {
diff --git a/boostchanger.sh b/boostchanger.sh
index 4cfe3ac09dd8..40e422ca2ee7 100644
--- a/boostchanger.sh
+++ b/boostchanger.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