Skip to content

Commit 6a5ffd8

Browse files
committed
Manage /etc/apt/sources.list.d/yunohost.sources as deb822 for switchto*
1 parent 9fb6920 commit 6a5ffd8

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

switchtoStable

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Patching sources.list to disable testing repository...
66
----
77
EOF
88

9+
if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then
10+
sed -i 's|^\s*Components\s*:\s*.*$|Components: stable|' "/etc/apt/sources.list.d/yunohost.sources"
11+
fi
12+
913
readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0)
1014
for FILE in "${apt_files[@]}"; do
1115
# Remove 'testing' and 'unstable' in lines using the yunohost repo

switchtoTesting

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Patching sources.list to enable testing repository...
66
----
77
EOF
88

9+
if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then
10+
sed -i 's|^\s*Components\s*:\s*.*$|Components: testing|' "/etc/apt/sources.list.d/yunohost.sources"
11+
fi
12+
913
readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0)
1014
for FILE in "${apt_files[@]}"; do
1115
# (Append 'testing' at the end of lines starting with the yunohost repo..)

switchtoUnstable

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Patching sources.list to enable unstable repository...
66
----
77
EOF
88

9+
if [ -f "/etc/apt/sources.list.d/yunohost.sources" ]; then
10+
sed -i 's|^\s*Components\s*:\s*.*$|Components: testing unstable|' "/etc/apt/sources.list.d/yunohost.sources"
11+
fi
12+
913
readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0)
1014
for FILE in "${apt_files[@]}"; do
1115
# (Append 'testing' at the end of lines starting with the yunohost repo..)

0 commit comments

Comments
 (0)