Commit 09ea9a5c authored by Paul Cammish's avatar Paul Cammish
Browse files

Deal with empty sources-list.d

parent bfd4e685
......@@ -42,7 +42,7 @@ fi
clear
echo
echo "-----------------------------------------------------------------------"
echo " Sympl Installer v20210823 "
echo " Sympl Installer v20211007 "
echo "-----------------------------------------------------------------------"
echo
echo "This script will help you install Sympl on a Debian Linux or Raspberry"
......@@ -112,6 +112,10 @@ echo "roundcube-core roundcube/reconfigure-webserver select apache2" | debconf-s
echo -n "Adding repository key..."
wget -qO- https://mirror.mythic-beasts.com/mythic/support@mythic-beasts.com.gpg.key | apt-key add - 2>/dev/null
# add an empty file in apt/sources-list.d and create the directory if needed.
mkdir -p /etc/apt/sources.list.d/
touch /etc/apt/sources.list.d/_empty
if [ "$(find /etc/apt/sources.list.d/ -mindepth 1 -maxdepth 1 -type f -name 'sympl_*.list' | wc -l )" != "0" ] \
|| [ "$( grep -c '^deb http://packages.mythic-beasts.com/mythic/' /etc/apt/sources.list.d/* )" != "0" ]; then
echo -n "Removing previous Sympl repo..."
......
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