parent
8d5371cfda
commit
756b3f8140
@ -1,5 +1,28 @@ |
||||
google-chrome --version > version.txt |
||||
VERSION=$(grep -Eo '[0-9]+\.' < version.txt | head -1 | cut -d'.' -f1) |
||||
echo "CHROME DRIVER INSTALL $VERSION" |
||||
yarn add -D chromedriver@$VERSION geckodriver |
||||
rm version.txt |
||||
#!/bin/bash |
||||
|
||||
# Determine the OS platform |
||||
OS="$(uname)" |
||||
|
||||
if [ "$OS" == "Darwin" ]; then |
||||
# macOS systems |
||||
if [ -e "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" ]; then |
||||
version=$("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --version) |
||||
echo "Google Chrome version on macOS: $version" |
||||
else |
||||
echo "Google Chrome is not installed on your macOS." |
||||
fi |
||||
elif [ "$OS" == "Linux" ]; then |
||||
# Linux systems |
||||
if command -v google-chrome >/dev/null; then |
||||
version=$(google-chrome --version) |
||||
echo "Google Chrome version on Linux: $version" |
||||
else |
||||
echo "Google Chrome is not installed on your Linux." |
||||
fi |
||||
else |
||||
echo "Unsupported OS." |
||||
fi |
||||
|
||||
MAJORVERSION=$(echo "$version" | grep -Eo '[0-9]+\.' | head -1 | cut -d'.' -f1) |
||||
echo "CHROME DRIVER INSTALL $MAJORVERSION" |
||||
yarn add -D chromedriver@$MAJORVERSION geckodriver |
||||
|
@ -1 +0,0 @@ |
||||
Google Chrome 122.0.6261.57 |
Loading…
Reference in new issue