summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNriver2023-01-09 17:02:50 +0800
committerNriver2023-01-09 17:02:50 +0800
commit0b690ed16163231596ea21ac3b8166f7627ed112 (patch)
tree104642a1ea15cba1524b3d9c7b94bceb6395c119
parent863f30bbed1e2b6697252a1bfaf4e61ca8f07777 (diff)
downloadaur-0b690ed16163231596ea21ac3b8166f7627ed112.tar.gz
use file instead of code and fix execurables
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
-rw-r--r--trilium-cn.desktop10
-rw-r--r--trilium-cn.sh3
4 files changed, 18 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 756387292f6e..4196404b1158 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = trilium-cn
pkgdesc = Trilium Notes 中文版
pkgver = 0.57.5_20221216
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/Nriver/trilium-translation
arch = x86_64
license = AGPL3
diff --git a/PKGBUILD b/PKGBUILD
index 4b475b9a7820..dba2a1cde4de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Nriver <6752679+Nriver@users.noreply.github.com>
pkgname="trilium-cn"
pkgver=0.57.5_20221216
-pkgrel=3
+pkgrel=4
pkgdesc="Trilium Notes 中文版"
arch=('x86_64')
url="https://github.com/Nriver/trilium-translation"
@@ -17,19 +17,8 @@ package() {
mkdir -p "$pkgdir/usr/share/applications"
# Move main files
mv trilium-linux-x64/* "$pkgdir/opt/$pkgname"
- # Write command and make executable
- echo -e "#!/bin/sh
-cd /opt/opt/$pkgname/
-./trilium" > "$pkgdir/usr/bin/trilium-cn"
+ # Create command
+ install -vDm755 "${srcdir}/trilium-cn.sh" $pkgdir/usr/bin/trilium-cn
# Create .desktop file
- echo -e "[Desktop Entry]
-Name=Trilium 中文版
-GenericName=笔记应用
-Comment=Trilium 中文版
-Exec=trilium-cn %f
-Icon=/opt/$pkgname/icon.png
-Terminal=false
-Type=Application
-Categories=Office
-StartupWMClass=trilium notes" > "$pkgdir/usr/share/applications/trilium-cn.desktop"
+ install -vDm755 "${srcdir}/trilium-cn.desktop" "$pkgdir/usr/share/applications/trilium-cn.desktop"
}
diff --git a/trilium-cn.desktop b/trilium-cn.desktop
new file mode 100644
index 000000000000..d618eba65ceb
--- /dev/null
+++ b/trilium-cn.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Trilium 中文版
+GenericName=笔记应用
+Comment=Trilium 中文版
+Exec=trilium-cn %f
+Icon=/opt/$pkgname/icon.png
+Terminal=false
+Type=Application
+Categories=Office
+StartupWMClass=trilium notes \ No newline at end of file
diff --git a/trilium-cn.sh b/trilium-cn.sh
new file mode 100644
index 000000000000..723ad3c76c47
--- /dev/null
+++ b/trilium-cn.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /opt/opt/trilium-cn/
+./trilium \ No newline at end of file