comparison contrib/automation/hgautomation/linux.py @ 43013:198b51d453fe

automation: use LSB_RELEASE instead of DEBIAN_VERSION This should be more robust since I believe the minor version can change mid release. Differential Revision: https://phab.mercurial-scm.org/D6910
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 29 Sep 2019 10:17:20 -0700
parents 89ba81771fc9
children 136c2536d83f
comparison
equal deleted inserted replaced
43012:d75142ef054a 43013:198b51d453fe
185 -----END PGP PUBLIC KEY BLOCK----- 185 -----END PGP PUBLIC KEY BLOCK-----
186 EOF 186 EOF
187 187
188 sudo apt-key add docker-apt-key 188 sudo apt-key add docker-apt-key
189 189
190 if [ "$DEBIAN_VERSION" = "9.8" ]; then 190 if [ "$LSB_RELEASE" = "stretch" ]; then
191 cat << EOF | sudo tee -a /etc/apt/sources.list 191 cat << EOF | sudo tee -a /etc/apt/sources.list
192 # Need backports for clang-format-6.0 192 # Need backports for clang-format-6.0
193 deb http://deb.debian.org/debian stretch-backports main 193 deb http://deb.debian.org/debian stretch-backports main
194 194
195 # Sources are useful if we want to compile things locally. 195 # Sources are useful if we want to compile things locally.
269 wget \ 269 wget \
270 xfsprogs \ 270 xfsprogs \
271 zip \ 271 zip \
272 zlib1g-dev" 272 zlib1g-dev"
273 273
274 if [ "$DEBIAN_VERSION" = "9.8" ]; then 274 if [ "LSB_RELEASE" = "stretch" ]; then
275 PACKAGES="$PACKAGES linux-perf" 275 PACKAGES="$PACKAGES linux-perf"
276 elif [ "$DISTRO" = "Ubuntu" ]; then 276 elif [ "$DISTRO" = "Ubuntu" ]; then
277 PACKAGES="$PACKAGES linux-tools-common" 277 PACKAGES="$PACKAGES linux-tools-common"
278 fi 278 fi
279 279