File tree Expand file tree Collapse file tree 2 files changed +42
-26
lines changed Expand file tree Collapse file tree 2 files changed +42
-26
lines changed Original file line number Diff line number Diff line change 1- echo "----"
2- echo "Patching sources.list to enable testing repository..."
3- echo "----"
4- for FILE in `ls /etc/apt/sources.list /etc/apt/sources.list.d/*`
5- do
1+ #! /usr/bin/env bash
2+
3+ cat << EOF
4+ ----
5+ Patching sources.list to enable 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
611 # (Append 'testing' at the end of lines starting with the yunohost repo..)
7- sed -i 's@^deb.* http://forge.yunohost.org.*@& testing@' $FILE
12+ sed -i ' s@^deb.* http://forge.yunohost.org.*@& testing@' " $FILE "
813done
914
10- echo "----"
11- echo "Running 'apt-get update'"
12- echo "----"
15+ cat << EOF
16+ ----
17+ Running 'apt-get update'
18+ ----
19+ EOF
1320apt-get update
1421
15- echo "----"
16- echo "Running 'apt-get dist-upgrade'"
17- echo "----"
22+ cat << EOF
23+ ----
24+ Running 'apt-get dist-upgrade'
25+ ----
26+ EOF
1827apt-get dist-upgrade -y
19-
Original file line number Diff line number Diff line change 1- echo "----"
2- echo "Patching sources.list to enable testing repository..."
3- echo "----"
4- for FILE in `ls /etc/apt/sources.list /etc/apt/sources.list.d/*`
5- do
1+ #! /usr/bin/env bash
2+
3+ cat << EOF
4+ ----
5+ Patching sources.list to enable unstable 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
611 # (Append 'testing' at the end of lines starting with the yunohost repo..)
7- sed -i 's@^deb http://forge.yunohost.org.*@& testing unstable@' $FILE
12+ sed -i ' s@^deb http://forge.yunohost.org.*@& testing unstable@' " $FILE "
813done
914
10- echo "----"
11- echo "Running 'apt-get update'"
12- echo "----"
15+ cat << EOF
16+ ----
17+ Running 'apt-get update'
18+ ----
19+ EOF
1320apt-get update
1421
15- echo "----"
16- echo "Running 'apt-get dist-upgrade'"
17- echo "----"
22+ cat << EOF
23+ ----
24+ Running 'apt-get dist-upgrade'
25+ ----
26+ EOF
1827apt-get dist-upgrade -y
19-
You can’t perform that action at this time.
0 commit comments