From df8f3b129892cf46f893c2deb5bf0a4c761fb6f4 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 12 Oct 2023 23:15:47 +0900 Subject: [PATCH] sources.list update --- install.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 51c284b..a7d6340 100755 --- a/install.sh +++ b/install.sh @@ -136,14 +136,8 @@ chmod +x install-scripts/* # Path to the sources.list file sources_list="/etc/apt/sources.list" -# Check if any lines starting with "#deb-src" exist -if grep -q "^#deb-src" "$sources_list"; then - echo "Found lines starting with '#deb-src' in $sources_list." -else - # Remove the '#' from the first line starting with '#deb-src' - echo "No lines starting with '#deb-src' found in $sources_list. Removing '#' from the first such line..." - sudo sed -i '0,/^#deb-src/ s/^#//' "$sources_list" -fi +# Remove the '#' from lines starting with '#deb-src' +sudo sed -i '/^#deb-src/ s/^# //' "$sources_list" # Remove the '#' from lines starting with '#deb' sudo sed -i '/^#deb/ s/^# //' "$sources_list"