-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdsm_douban_patch.sh
49 lines (41 loc) · 2.18 KB
/
dsm_douban_patch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
clear;
# VAR ******************************************************************
vVersion='1.7';
vAction=$1;
# Logo ******************************************************************
CopyrightLogo="
DS Video Douban 搜刮器补丁 $vVersion QQ 群:160128165
==========================================================================";
echo "$CopyrightLogo";
# Function List *******************************************************************************
function install()
{
cd /tmp/;
wget --no-check-certificate https://gitee.com/siryle1213/dsm_javdb_patch/raw/master/dsm_douban_patch.tar -O dsm_douban_patch.tar;
tar -xvf dsm_douban_patch.tar
cp -rfa ./dsm_douban_patch/syno_themoviedb /var/packages/VideoStation/target/plugins/;
cp -rfa ./dsm_douban_patch/syno_themoviedb_tv /var/packages/VideoStation/target/plugins/;
cp -rfa ./dsm_douban_patch/syno_file_assets /var/packages/VideoStation/target/plugins/;
chmod 0755 /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
chmod 0755 /var/packages/VideoStation/target/plugins/syno_themoviedb_tv/search.php
chmod 0755 /var/packages/VideoStation/target/plugins/syno_file_assets/douban.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb_tv/search.php
cd -
rm -rf dsm_douban_patch.sh
echo '==========================================================================';
echo "恭喜, DS Video Douban 搜刮器补丁 $vVersion 安装完成!";
echo '==========================================================================';
}
# SHELL ******************************************************************
if [ "$vAction" == 'install' ]; then
install;
else
echo '错误的命令';
echo '==========================================================================';
rm -rf dsm_douban_patch.sh
exit 1
fi;