Skip to content

Commit 23dccb6

Browse files
authored
Merge pull request #83 from YunoHost/switchtostable
2 parents 234390d + 10cbdf8 commit 23dccb6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

switchtoStable

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
cat << EOF
4+
----
5+
Patching sources.list to disable testing repository...
6+
----
7+
EOF
8+
9+
readarray -d '' apt_files < <(find /etc/apt/sources.list /etc/apt/sources.list.d -type f -print0)
10+
for FILE in "${apt_files[@]}"; do
11+
# Remove 'testing' and 'unstable' in lines using the yunohost repo
12+
sed -i 's|^\(deb.*yunohost.org.*\) testing\(.*\)$|\1\2|' "$FILE"
13+
sed -i 's|^\(deb.*yunohost.org.*\) unstable\(.*\)$|\1\2|' "$FILE"
14+
done
15+
16+
cat << EOF
17+
----
18+
Running 'apt-get update'
19+
----
20+
EOF
21+
apt-get update
22+
23+
cat << EOF
24+
----
25+
Running 'apt-get dist-upgrade'
26+
----
27+
EOF
28+
apt-get dist-upgrade -y

0 commit comments

Comments
 (0)