summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBen2021-03-15 11:40:25 +0800
committerBen2021-03-15 11:40:25 +0800
commitc7776c412779bce98151731c3cf9967f25772dd5 (patch)
tree6b35a188499afa18014e80d9a056f079cda354e9 /PKGBUILD
parentdc8fd78c750734e4715ea086f358b593b476d205 (diff)
downloadaur-wudao-dict-git.tar.gz
Moving working directory from / to $HOME
1. Referring to deepin-wine, the working directory is moved to the user's home directory('$HOME/.local/share/wudao-dict') and the 777 permission of 'usr' is removed. 1. Create: /usr/bin/wd at the first time. 2. Remove: 'wudao-dict-git.install'. 2. Only sub-directory is installed.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 10 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 360105bba6c..6cbe8e1b4f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,28 @@
# Maintainer: Ben <bensongsyz@gmail.com>
pkgname='wudao-dict-git'
pkgver=2.1
-pkgrel=1
+pkgrel=2
pkgdesc='The command line version of Youdao Dictionary, supporting English-Chinese mutual search and online search.'
arch=('any')
url="https://github.com/ChestnutHeng/Wudao-dict"
license=('unknown')
depends=('python' 'python-bs4' 'python-lxml')
+install="wudao-dict-git.install"
makedepends=('git')
-source=('wudao-dict::git://github.com/ChestnutHeng/Wudao-dict.git')
-md5sums=('SKIP')
+source=('wudao-dict::git://github.com/ChestnutHeng/Wudao-dict.git'
+ 'wd')
+md5sums=('SKIP'
+ '7e504991b277c83136466f885626cd7c')
package() {
- cd "$srcdir"
-
mkdir -p "${pkgdir}/opt"
- cp -r "./wudao-dict" "${pkgdir}/opt/"
-
- # 用户词
- mkdir -p "${pkgdir}/opt/wudao-dict/wudao-dict/usr"
- chmod -R 777 "${pkgdir}/opt/wudao-dict/wudao-dict/usr"
+ cp -r "./wudao-dict/wudao-dict" "${pkgdir}/opt/"
+# # 添加系统命令wd
mkdir -p "${pkgdir}/usr/bin"
-
- # 添加系统命令wd
- cd "${pkgdir}/usr/bin"
- echo '#!/bin/bash'>./wd
- echo 'save_path=$PWD'>>./wd
- echo 'cd '/opt/wudao-dict/wudao-dict >>./wd
- echo './wdd $*'>>./wd
- echo 'cd $save_path'>>./wd
- chmod +x ./wd
+ cp ./wd "${pkgdir}/usr/bin"
# 添加bash_completion自动补全
mkdir -p "${pkgdir}/etc/bash_completion.d"
- ln -s /opt/wudao-dict/wudao-dict/wd_com "${pkgdir}/etc/bash_completion.d/wd"
+ ln -s /opt/wudao-dict/wd_com "${pkgdir}/etc/bash_completion.d/wd"
}