Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage repo before upgrade #63

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions install_yunohost
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ function check_assertions()

function upgrade_system() {

# Comment cdrom repository line
if grep -E "^deb[[:blank:]]+cdrom:\[Debian.+?stretch[[:blank:]]+main$" /etc/apt/sources.list then
sed -i -E "s/^(deb[[:blank:]]+cdrom:\[Debian.+?)stretch[[:blank:]]+main$/\#\1stretch[[:blank:]]main/g" /etc/apt/sources.list
fi

# Add the main repository if it is not already in the sources.list file.
if ! grep -E "^deb[[:blank:]]+http://deb.debian.org/debian\/?[[:blank:]]+stretch[[:blank:]]+main$" /etc/apt/sources.list then
echo "deb http://deb.debian.org/debian stretch main" >> /etc/apt/sources.list
fi

apt_get_wrapper update \
|| return 1

Expand Down