diff --git a/switchtoStable b/switchtoStable index b7fb3e7..c79cae8 100644 --- a/switchtoStable +++ b/switchtoStable @@ -6,6 +6,10 @@ Patching sources.list to disable testing repository... ---- EOF +if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then + sed -i 's|^\s*Components\s*:\s*.*$|Components: stable|' "/etc/apt/sources.list.d/yunohost.sources" +fi + readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0) for FILE in "${apt_files[@]}"; do # Remove 'testing' and 'unstable' in lines using the yunohost repo diff --git a/switchtoTesting b/switchtoTesting index 6869ade..e63211d 100644 --- a/switchtoTesting +++ b/switchtoTesting @@ -6,6 +6,10 @@ Patching sources.list to enable testing repository... ---- EOF +if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then + sed -i 's|^\s*Components\s*:\s*.*$|Components: testing|' "/etc/apt/sources.list.d/yunohost.sources" +fi + readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0) for FILE in "${apt_files[@]}"; do # (Append 'testing' at the end of lines starting with the yunohost repo..) diff --git a/switchtoUnstable b/switchtoUnstable index fd1a9e0..f4ca92e 100644 --- a/switchtoUnstable +++ b/switchtoUnstable @@ -6,6 +6,10 @@ Patching sources.list to enable unstable repository... ---- EOF +if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then + sed -i 's|^\s*Components\s*:\s*.*$|Components: testing unstable|' "/etc/apt/sources.list.d/yunohost.sources" +fi + readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0) for FILE in "${apt_files[@]}"; do # (Append 'testing' at the end of lines starting with the yunohost repo..)