Quantcast
Channel: How to automatically update /etc/apt/sources.list with source URIs on Ubuntu 16.04? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 7

Answer by Håkon Hægland for How to automatically update /etc/apt/sources.list with source URIs on Ubuntu 16.04?

$
0
0

Here is a (currently untested) Bash script that could be used to uncomment deb-src lines in sources.list :

tempdir=$(mktemp -d)cd "$tempdir"source_file=/etc/apt/sources.listnew_file=sources.list.newperl -pE 's/^#\s+(deb-src)/$1/'"$source_file"> "$new_file"sudo cp "$new_file""$source_file"sudo apt-get update

Viewing all articles
Browse latest Browse all 7

Trending Articles