mirror of
https://github.com/archlinux/aur.git
synced 2026-02-08 21:43:04 +01:00
version=3.1.22.204707, script update:避免用户使用root/sudo运行
This commit is contained in:
parent
77e9c979fb
commit
4e2dee0118
4 changed files with 61 additions and 4 deletions
5
.SRCINFO
5
.SRCINFO
|
|
@ -1,8 +1,9 @@
|
|||
pkgbase = netease-cloud-music-wine
|
||||
pkgdesc = NetEase Cloud Music Player
|
||||
pkgdesc = NetEase Cloud Music Player. 使用wine运行网易云音乐windows官方包。
|
||||
pkgver = 3.1.22.204707
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://music.163.com/#/download
|
||||
install = .install
|
||||
arch = x86_64
|
||||
license = custom
|
||||
makedepends = 7zip
|
||||
|
|
|
|||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
pkg
|
||||
src
|
||||
*.exe
|
||||
*.zst
|
||||
33
.install
Normal file
33
.install
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
post_install(){
|
||||
cat << 'EOF'
|
||||
################################
|
||||
netease-cloud-music-wine:
|
||||
|
||||
To run this application via commandline,
|
||||
you can run command:
|
||||
|
||||
netease-cloud-music-wine
|
||||
|
||||
or:
|
||||
|
||||
cloudmusic
|
||||
|
||||
################################
|
||||
EOF
|
||||
}
|
||||
|
||||
post_remove(){
|
||||
cat << 'EOF'
|
||||
################################
|
||||
netease-cloud-music-wine:
|
||||
|
||||
After uninstalled this application,
|
||||
if necessary,
|
||||
please remove below cache directory manually:
|
||||
|
||||
$HOME/.cache/netease-cloud-music-wine
|
||||
|
||||
|
||||
################################
|
||||
EOF
|
||||
}
|
||||
23
PKGBUILD
23
PKGBUILD
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
pkgname='netease-cloud-music-wine'
|
||||
pkgver=3.1.22.204707
|
||||
pkgrel=1
|
||||
pkgdesc="NetEase Cloud Music Player"
|
||||
pkgrel=2
|
||||
pkgdesc="NetEase Cloud Music Player. 使用wine运行网易云音乐windows官方包。"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="https://music.163.com/#/download"
|
||||
|
|
@ -11,6 +11,7 @@ depends=('wine' 'noto-fonts-cjk')
|
|||
makedepends=('7zip')
|
||||
#optdepends=('')
|
||||
#conflicts=('')
|
||||
install=.install
|
||||
DLAGENTS=(
|
||||
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -A "Mozilla/5.0" -o %o %u'
|
||||
)
|
||||
|
|
@ -28,6 +29,15 @@ prepare() {
|
|||
cat > install.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
|
||||
# prevent running by root/sudo
|
||||
# refer Wine official FAQ, do not run wine with sudo or root permission.
|
||||
if [[ $(id -u) -eq 0 ]];
|
||||
then
|
||||
echo "ERROR: you should not use root/sudo to run this application."
|
||||
echo "ERROR: prevent running by root/sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${WINEPREFIX}" ]];
|
||||
then
|
||||
echo "\$WINEPREFIX not set." >&2
|
||||
|
|
@ -54,6 +64,15 @@ EOF
|
|||
cat > run.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
|
||||
# prevent running by root/sudo
|
||||
# refer Wine official FAQ, do not run wine with sudo or root permission.
|
||||
if [[ $(id -u) -eq 0 ]];
|
||||
then
|
||||
echo "ERROR: you should not use root/sudo to run this application."
|
||||
echo "ERROR: prevent running by root/sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "${XDG_CACHE_HOME}" ]];
|
||||
then
|
||||
SETUP_DIR="${XDG_CACHE_HOME}"/netease-cloud-music-wine
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue