26 lines
904 B
Bash
Executable File
26 lines
904 B
Bash
Executable File
#!/bin/bash
|
||
set -e
|
||
|
||
# The Selenium gem isn’t shipped with the `selenium-manager` binary for aarch64
|
||
# (yet). So we have to compile it ourselves.
|
||
if [ "$(dpkg --print-architecture)" = "arm64" ]; then
|
||
apt update && apt install -y firefox-esr chromium-driver
|
||
cd /tmp
|
||
/tmp/install-rust
|
||
git clone --depth 1 --no-checkout https://github.com/SeleniumHQ/selenium.git
|
||
cd selenium
|
||
git sparse-checkout set rust
|
||
git checkout
|
||
cd rust
|
||
cargo build --release
|
||
cp target/release/selenium-manager /usr/local/bin
|
||
rustup self uninstall -y
|
||
cd /
|
||
rm -rf /tmp/*
|
||
else
|
||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&\
|
||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\
|
||
apt update &&\
|
||
apt install -y google-chrome-stable firefox-esr chromium-driver
|
||
fi
|