7 Star 32 Fork 19

ChallengerV/dsm_javdb_patch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dsm_javdb_patch.sh 4.34 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
clear;
# VAR ******************************************************************
vVersion='1.1';
vAction=$1;
# Logo ******************************************************************
CopyrightLogo="
DS Video JavDB 搜刮器补丁 $vVersion QQ 群:160128165
==========================================================================";
echo "$CopyrightLogo";
# Function List *******************************************************************************
function install()
{
cd /tmp/;
wget https://bootstrap.pypa.io/ez_setup.py -O - | python && easy_install pip && pip install requests && pip install bs4 && pip install lxml
mv /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php.javback
mv /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php.javback
wget --no-check-certificate https://gitee.com/challengerV/dsm_javdb_patch/raw/master/dsm_javdb_patch.tar -O dsm_javdb_patch.tar;
tar -xvf dsm_javdb_patch.tar
cp -rfa ./dsm_javdb_patch/syno_themoviedb /var/packages/VideoStation/target/plugins/;
cp -rfa ./dsm_javdb_patch/syno_synovideodb /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/list.py
chmod 0755 /var/packages/VideoStation/target/plugins/syno_themoviedb/data.py
chmod 0755 /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php
cd -
rm -rf dsm_javdb_patch.sh
echo '==========================================================================';
echo "恭喜, DS Video JavDB 补丁 $vVersion 安装完成!";
echo '==========================================================================';
}
function uninstall()
{
rm /var/packages/VideoStation/target/plugins/syno_themoviedb/list.py
rm /var/packages/VideoStation/target/plugins/syno_themoviedb/data.py
mv -f /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php.javback /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
mv -f /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php.javback /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php
chmod 0755 /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
chmod 0755 /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb/search.php
chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_synovideodb/search.php
rm -rf dsm_javdb_patch.sh
echo 'DS Video JavDB Patch 卸载完成! QQ 群:160128165';
echo '==========================================================================';
}
# SHELL ******************************************************************
if [ "$vAction" == 'install' ]; then
if [ ! -f "/var/packages/VideoStation/target/plugins/syno_themoviedb/search.php.javback" ]; then
install;
else
echo '你已经安装过 DS Video JavDB 或 JavDB 补丁. QQ 群:160128165';
echo '如需卸载请执行: wget https://gitee.com/challengerV/dsm_javdb_patch/raw/master/dsm_javdb_patch.sh &&sh dsm_javdb_patch.sh uninstall';
echo '==========================================================================';
rm -rf dsm_javdb_patch.sh
exit 1;
fi;
elif [ "$vAction" == 'uninstall' ]; then
if [ ! -f "/var/packages/VideoStation/target/plugins/syno_themoviedb/search.php.javback" ]; then
echo '你还没用安装过 installed DS Video JavDB 补丁,无需卸载. QQ 群:160128165';
echo '==========================================================================';
rm -rf dsm_javdb_patch.sh
exit 1;
else
uninstall;
fi;
else
echo '错误的命令';
echo '==========================================================================';
rm -rf dsm_javdb_patch.sh
exit 1
fi;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/challengerV/dsm_javdb_patch.git
git@gitee.com:challengerV/dsm_javdb_patch.git
challengerV
dsm_javdb_patch
dsm_javdb_patch
master

搜索帮助