Commit 9deb6cba authored by diesys's avatar diesys 🎈

installer with update

parent 21cdafcd
......@@ -4,6 +4,14 @@ if [ "$(whoami)" != "root" ]
then echo "This script is not running as root... exiting" && exit 1
fi
if [ "$1" == "-u" ]
then
echo "Updating theme..."
# mkdir .transmission-web-soft-theme-tmp
# cd .transmission-web-soft-theme-tmp
git pull https://git.eigenlab.org/sbiego/transmission-web-soft-theme.git
fi
echo "Checking transmission installation..."
if [ ! -d "$(find /usr/share/transmission/ -iname "web" -type d)" ]
......@@ -28,23 +36,26 @@ fi
cp -rv ./web/* ${installdir}/web/
echo -e "\nTransmission soft theme successfully installed!\n \nWould you like to apply a soft theme now?\nNOTE: if you've already installed it, just modify the " $installdir "/web/index.html following the instructions on the wiki!\n"
PS3=': '
options=( "Dark" "Light" "Quit" )
select opt in "${options[@]}"
do
case $opt in
"Dark")
sed -i '21i\\t\t<link href="./style/transmission/soft-theme.min.css" type="text/css" rel="stylesheet" />\n\t\t<link href="style/transmission/soft-dark-theme.min.css" type="text/css" rel="stylesheet" />\n' ${installdir}/web/index.html;
echo "Soft dark theme successfully applied!";
break;;
"Light")
sed -i '21i\\t\t<link href="./style/transmission/soft-theme.min.css" type="text/css" rel="stylesheet" />\n\t\t<link href="style/transmission/soft-light-theme.min.css" type="text/css" rel="stylesheet" />\n' ${installdir}/web/index.html;
echo "Soft light theme successfully applied!";
break;;
"Quit")
echo 'You can always install it following the https://git.eigenlab.org/sbiego/transmission-web-soft-theme/wikis/home';
break;;
*) echo 'invalid option'
esac
done
if [ "$1" != "-u" ]
then
echo -e "\nTransmission soft theme successfully installed!\n \nWould you like to apply a soft theme now?\nWARNING: if this is an UPDATE you have to skip this!\nNOTE: if you've already installed it, to change theme just modify the " $installdir "/web/index.html following the instructions on the wiki!\n"
PS3=': '
options=( "Dark" "Light" "Quit" )
select opt in "${options[@]}"
do
case $opt in
"Dark")
sed -i '21i\\t\t<link href="./style/transmission/soft-theme.min.css" type="text/css" rel="stylesheet" />\n\t\t<link href="style/transmission/soft-dark-theme.min.css" type="text/css" rel="stylesheet" />\n' ${installdir}/web/index.html;
echo "Soft dark theme successfully applied!";
break;;
"Light")
sed -i '21i\\t\t<link href="./style/transmission/soft-theme.min.css" type="text/css" rel="stylesheet" />\n\t\t<link href="style/transmission/soft-light-theme.min.css" type="text/css" rel="stylesheet" />\n' ${installdir}/web/index.html;
echo "Soft light theme successfully applied!";
break;;
"Quit")
echo 'You can always install it following the https://git.eigenlab.org/sbiego/transmission-web-soft-theme/wikis/home';
break;;
*) echo 'invalid option'
esac
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment