mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
fix: bail early when installing channels on non-ubuntu (#11617)
Fixes #11615
This commit is contained in:
parent
42876a0528
commit
3c27badd31
@ -7,6 +7,17 @@ if [[ $(arch) == "aarch64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "/etc/os-release" ]]; then
|
||||
echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ID=$(bash -c 'source /etc/os-release && echo $ID')
|
||||
if [[ "${ID}" != "ubuntu" ]]; then
|
||||
echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. make sure to remove old beta if any.
|
||||
if dpkg --get-selections | grep -q "^google-chrome-beta[[:space:]]*install$" >/dev/null; then
|
||||
apt-get remove -y google-chrome-beta
|
||||
|
@ -7,6 +7,17 @@ if [[ $(arch) == "aarch64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "/etc/os-release" ]]; then
|
||||
echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ID=$(bash -c 'source /etc/os-release && echo $ID')
|
||||
if [[ "${ID}" != "ubuntu" ]]; then
|
||||
echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. make sure to remove old stable if any.
|
||||
if dpkg --get-selections | grep -q "^google-chrome[[:space:]]*install$" >/dev/null; then
|
||||
apt-get remove -y google-chrome
|
||||
|
@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "/etc/os-release" ]]; then
|
||||
echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ID=$(bash -c 'source /etc/os-release && echo $ID')
|
||||
if [[ "${ID}" != "ubuntu" ]]; then
|
||||
echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. make sure to remove old beta if any.
|
||||
if dpkg --get-selections | grep -q "^microsoft-edge-beta[[:space:]]*install$" >/dev/null; then
|
||||
apt-get remove -y microsoft-edge-beta
|
||||
|
@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "/etc/os-release" ]]; then
|
||||
echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ID=$(bash -c 'source /etc/os-release && echo $ID')
|
||||
if [[ "${ID}" != "ubuntu" ]]; then
|
||||
echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. make sure to remove old dev if any.
|
||||
if dpkg --get-selections | grep -q "^microsoft-edge-dev[[:space:]]*install$" >/dev/null; then
|
||||
apt-get remove -y microsoft-edge-dev
|
||||
|
@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "/etc/os-release" ]]; then
|
||||
echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ID=$(bash -c 'source /etc/os-release && echo $ID')
|
||||
if [[ "${ID}" != "ubuntu" ]]; then
|
||||
echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 1. make sure to remove old stable if any.
|
||||
if dpkg --get-selections | grep -q "^microsoft-edge-stable[[:space:]]*install$" >/dev/null; then
|
||||
apt-get remove -y microsoft-edge-stable
|
||||
|
Loading…
Reference in New Issue
Block a user