1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

[fix] Prevent patching sources twice.

This commit is contained in:
opi 2014-11-11 16:55:15 +01:00
parent cef8d78a49
commit c075d93f7a

View file

@ -25,9 +25,13 @@ sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
sudo service transmission-daemon reload
# Patch sources to add a download button
if grep 'toolbar-downloads' /usr/share/transmission/web/index.html --quiet; then
sudo cp ../sources/toolbar-downloads.png /usr/share/transmission/web/style/transmission/images/toolbar-downloads.png
sudo bash -c 'cat ../sources/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css'
sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\"></a>@g" /usr/share/transmission/web/index.html
fi
# Configure Nginx and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf