Skip to content

Commit

Permalink
Merge pull request #83 from YunoHost/switchtostable
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar authored Nov 1, 2024
2 parents 234390d + 10cbdf8 commit 23dccb6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions switchtoStable
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

cat << EOF
----
Patching sources.list to disable testing repository...
----
EOF

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
sed -i 's|^\(deb.*yunohost.org.*\) testing\(.*\)$|\1\2|' "$FILE"
sed -i 's|^\(deb.*yunohost.org.*\) unstable\(.*\)$|\1\2|' "$FILE"
done

cat << EOF
----
Running 'apt-get update'
----
EOF
apt-get update

cat << EOF
----
Running 'apt-get dist-upgrade'
----
EOF
apt-get dist-upgrade -y

0 comments on commit 23dccb6

Please sign in to comment.