#!/bin/bash args="" pkgs="" for i in "$@"; do if [[ "$i" == "playwright" ]]; then args="${args} ${PLAYWRIGHT_TGZ}" pkgs="${pkgs} playwright" elif [[ $i == "playwright-core" ]]; then args="${args} ${PLAYWRIGHT_CORE_TGZ}" pkgs="${pkgs} playwright-core" elif [[ $i == "playwright-firefox" ]]; then args="${args} ${PLAYWRIGHT_FIREFOX_TGZ}" pkgs="${pkgs} playwright-firefox" elif [[ $i == "playwright-chromium" ]]; then args="${args} ${PLAYWRIGHT_CHROMIUM_TGZ}" pkgs="${pkgs} playwright-chromium" elif [[ $i == "playwright-webkit" ]]; then args="${args} ${PLAYWRIGHT_WEBKIT_TGZ}" pkgs="${pkgs} playwright-webkit" elif [[ $i == "@playwright/test" ]]; then args="${args} ${PLAYWRIGHT_TEST_TGZ}" pkgs="${pkgs} @playwright/test" elif [[ $i == "-"* ]]; then args="${args} $i" else echo "ERROR: cannot install package $i using npm_i. Use regular npm instead" fi done npm install $args 2>&1 SCRIPT=$(cat <