1
0
mirror of synced 2026-08-04 22:46:55 +00:00

chore: add help section for the driver download script (#196)

This commit is contained in:
codeboyzhou
2021-01-08 01:30:23 +08:00
committed by GitHub
parent c3190b152a
commit 75c47a88ff
+19 -1
View File
@@ -6,12 +6,26 @@ set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
if [[ ($1 == '-h') || ($1 == '--help') ]]; then
echo ""
echo "This script for downloading playwright-cli binaries for all platforms."
echo "The downloaded files will be put into directory 'driver-bundle/src/main/resources/driver'."
echo ""
echo "Usage: scripts/download_driver_for_all_platforms.sh [option]"
echo ""
echo "Options:"
echo " -h, --help display help information"
echo " -f, --force delete existing drivers and download them again"
echo ""
exit 0
fi
CLI_VERSION=$(head -1 ./CLI_VERSION)
FILE_PREFIX=playwright-cli-$CLI_VERSION
cd ../driver-bundle/src/main/resources
if [[ $1 == '-f' ]]; then
if [[ ($1 == '-f') || ($1 == '--force') ]]; then
echo "Deleting existing drivers from $(pwd)"
rm -rf driver
fi
@@ -43,3 +57,7 @@ do
cd -
done
echo ""
echo "All drivers have been downloaded successfully, use '-f' or '--force' option to delete and download them again if you want."
echo "For more details, you can use '-h' or '--help' option, or read the CONTRIBUTING.md for reference."
echo ""