Skip to content

Commit

Permalink
fix: no more svn
Browse files Browse the repository at this point in the history
  • Loading branch information
tautcony committed Jan 12, 2024
1 parent 998632e commit b5c67e0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 15 deletions.
27 changes: 20 additions & 7 deletions packages/package/install/installpackage-rutorrent
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,25 @@ function _configureApp() {
if [[ ! -d ${plugin_lib} ]]; then
mkdir -p ${plugin_lib}
cp -R /srv/$APP_NAME/plugins ${plugin_lib}

wget -t3 -T20 -q -O /tmp/rutorrent-thirdparty-plugins.zip https://codeload.github.com/nelu/rutorrent-thirdparty-plugins/zip/refs/heads/stable >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-thirdparty-plugins.zip -d /tmp/ >>"${OUTTO}" 2>&1
if [[ ! -d ${plugin_lib}fileupload ]]; then
_execute "sudo svn co https://github.com/nelu/rutorrent-thirdparty-plugins/trunk/fileupload ${plugin_lib}fileupload"
cp -Rfv /tmp/rutorrent-thirdparty-plugins-stable/fileupload/. "${plugin_lib}fileupload" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}fileshare ]]; then
_execute "sudo svn co https://github.com/nelu/rutorrent-thirdparty-plugins/trunk/fileshare ${plugin_lib}fileshare"
cp -Rfv /tmp/rutorrent-thirdparty-plugins-stable/fileshare/. "${plugin_lib}fileshare" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}pausewebui ]]; then
_execute "sudo svn co https://github.com/Gyran/rutorrent-pausewebui/trunk/ ${plugin_lib}pausewebui"
wget -t3 -T20 -q -O /tmp/rutorrent-pausewebui.zip https://codeload.github.com/Gyran/rutorrent-pausewebui/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-pausewebui.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-pausewebui-master/. "${plugin_lib}pausewebui" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}filemanager ]]; then
# Pin to v1.0 ref: https://github.com/nelu/rutorrent-filemanager/issues/30
_execute "sudo git clone -b v1.0 https://github.com/nelu/rutorrent-filemanager.git ${plugin_lib}filemanager"
wget -t3 -T20 -q -O /tmp/rutorrent-filemanager.zip https://codeload.github.com/nelu/rutorrent-filemanager/zip/refs/tags/v1.0 >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-filemanager.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-filemanager-1.0/. "${plugin_lib}filemanager" >>"${OUTTO}" 2>&1
cat >${plugin_lib}filemanager/conf.php <<EOF
<?php
Expand Down Expand Up @@ -255,7 +262,9 @@ EOF
fi

if [[ ! -d ${plugin_lib}ratiocolor ]]; then
_execute "sudo svn co https://github.com/Gyran/rutorrent-ratiocolor.git/trunk ${plugin_lib}ratiocolor"
wget -t3 -T20 -q -O /tmp/rutorrent-ratiocolor.zip https://codeload.github.com/Gyran/rutorrent-ratiocolor/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-ratiocolor.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-ratiocolor-master/. "${plugin_lib}ratiocolor" >>"${OUTTO}" 2>&1
sed -i "s/changeWhat = \"cell-background\";/changeWhat = \"font\";/g" ${plugin_lib}ratiocolor/init.js
fi
# if [[ ! -d ${plugin_lib}logoff ]]; then
Expand All @@ -265,10 +274,14 @@ EOF
# rm -rf logoff-1.3.tar.gz
# fi
if [[ ! -d ${plugin_lib}mobile ]]; then
_execute "sudo git clone https://github.com/xombiemp/rutorrentMobile.git ${plugin_lib}mobile"
wget -t3 -T20 -q -O /tmp/rutorrent-mobile.zip https://codeload.github.com/xombiemp/rutorrentMobile/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-mobile.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrentMobile-master/. "${plugin_lib}mobile" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}stream ]]; then
_execute "sudo svn co https://github.com/hashknot/rutorrent-stream/trunk/stream ${plugin_lib}stream"
wget -t3 -T20 -q -O /tmp/rutorrent-stream.zip https://codeload.github.com/autodl-community/autodl-rutorrent/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-stream.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/autodl-rutorrent-master/. "${plugin_lib}stream" >>"${OUTTO}" 2>&1
fi
fi
rm -rf /srv/rutorrent/plugins/_cloudflare
Expand Down
27 changes: 20 additions & 7 deletions packages/package/update/updatepackage-rutorrent
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,25 @@ function _updateApp() {
rm -rf ${plugin_lib}
if [[ ! -d ${plugin_lib} ]]; then
cp -R /srv/$APP_NAME/plugins ${plugin_lib}

wget -t3 -T20 -q -O /tmp/rutorrent-thirdparty-plugins.zip https://codeload.github.com/nelu/rutorrent-thirdparty-plugins/zip/refs/heads/stable >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-thirdparty-plugins.zip -d /tmp/ >>"${OUTTO}" 2>&1
if [[ ! -d ${plugin_lib}fileupload ]]; then
_execute "sudo svn co https://github.com/nelu/rutorrent-thirdparty-plugins/trunk/fileupload ${plugin_lib}fileupload"
cp -Rfv /tmp/rutorrent-thirdparty-plugins-stable/fileupload/. "${plugin_lib}fileupload" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}fileshare ]]; then
_execute "sudo svn co https://github.com/nelu/rutorrent-thirdparty-plugins/trunk/fileshare ${plugin_lib}fileshare"
cp -Rfv /tmp/rutorrent-thirdparty-plugins-stable/fileshare/. "${plugin_lib}fileshare" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}pausewebui ]]; then
_execute "sudo svn co https://github.com/Gyran/rutorrent-pausewebui/trunk/ ${plugin_lib}pausewebui"
wget -t3 -T20 -q -O /tmp/rutorrent-pausewebui.zip https://codeload.github.com/Gyran/rutorrent-pausewebui/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-pausewebui.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-pausewebui-master/. "${plugin_lib}pausewebui" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}filemanager ]]; then
# Pin to v1.0 ref: https://github.com/nelu/rutorrent-filemanager/issues/30
_execute "sudo git clone -b v1.0 https://github.com/nelu/rutorrent-filemanager.git ${plugin_lib}filemanager"
wget -t3 -T20 -q -O /tmp/rutorrent-filemanager.zip https://codeload.github.com/nelu/rutorrent-filemanager/zip/refs/tags/v1.0 >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-filemanager.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-filemanager-1.0/. "${plugin_lib}filemanager" >>"${OUTTO}" 2>&1
cat >${plugin_lib}filemanager/conf.php <<EOF
<?php
Expand Down Expand Up @@ -233,7 +240,9 @@ EOF
fi

if [[ ! -d ${plugin_lib}ratiocolor ]]; then
_execute "sudo svn co https://github.com/Gyran/rutorrent-ratiocolor.git/trunk ${plugin_lib}ratiocolor"
wget -t3 -T20 -q -O /tmp/rutorrent-ratiocolor.zip https://codeload.github.com/Gyran/rutorrent-ratiocolor/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-ratiocolor.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrent-ratiocolor-master/. "${plugin_lib}ratiocolor" >>"${OUTTO}" 2>&1
sed -i "s/changeWhat = \"cell-background\";/changeWhat = \"font\";/g" ${plugin_lib}ratiocolor/init.js
fi
# if [[ ! -d ${plugin_lib}logoff ]]; then
Expand All @@ -243,10 +252,14 @@ EOF
# rm -rf logoff-1.3.tar.gz
# fi
if [[ ! -d ${plugin_lib}mobile ]]; then
_execute "sudo git clone https://github.com/xombiemp/rutorrentMobile.git ${plugin_lib}mobile"
wget -t3 -T20 -q -O /tmp/rutorrent-mobile.zip https://codeload.github.com/xombiemp/rutorrentMobile/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-mobile.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/rutorrentMobile-master/. "${plugin_lib}mobile" >>"${OUTTO}" 2>&1
fi
if [[ ! -d ${plugin_lib}stream ]]; then
_execute "sudo svn co https://github.com/hashknot/rutorrent-stream/trunk/stream ${plugin_lib}stream"
wget -t3 -T20 -q -O /tmp/rutorrent-stream.zip https://codeload.github.com/autodl-community/autodl-rutorrent/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o /tmp/rutorrent-stream.zip -d /tmp/ >>"${OUTTO}" 2>&1
cp -Rfv /tmp/autodl-rutorrent-master/. "${plugin_lib}stream" >>"${OUTTO}" 2>&1
fi
fi
rm -rf /srv/rutorrent/plugins/_cloudflare
Expand Down
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,9 @@ function _insngx() {

cp ${local_setup_template}nginx/proxy.conf.template /etc/nginx/snippets/proxy.conf

svn export https://github.com/Naereen/Nginx-Fancyindex-Theme/trunk/Nginx-Fancyindex-Theme-dark /srv/fancyindex >>"${OUTTO}" 2>&1
# Download nginx fancyindex theme
wget -t3 -T20 -q -O /tmp/fancyindex.zip https://codeload.github.com/Naereen/Nginx-Fancyindex-Theme/zip/refs/heads/master >>"${OUTTO}" 2>&1
unzip -o -j /tmp/fancyindex.zip "Nginx-Fancyindex-Theme-master/Nginx-Fancyindex-Theme-dark/*" -d "/srv/fancyindex" >>"${OUTTO}" 2>&1
cp ${local_setup_template}nginx/fancyindex.conf.template /etc/nginx/snippets/fancyindex.conf
sed -i 's/href="\/[^\/]*/href="\/fancyindex/g' /srv/fancyindex/header.html
sed -i 's/src="\/[^\/]*/src="\/fancyindex/g' /srv/fancyindex/footer.html
Expand Down

0 comments on commit b5c67e0

Please sign in to comment.