-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script for updating selenium manager
- Loading branch information
1 parent
d847116
commit c87de7b
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
gh run download --pattern 'selenium-manager*' | ||
|
||
extract_move_delete() { | ||
local SOURCE="$1" | ||
local TARGET="$2" | ||
local PARENT_DIR="$(dirname "$SOURCE")" | ||
|
||
if [[ "$SOURCE" == *.tar ]]; then | ||
tar -xf "$SOURCE" -C "$TARGET" | ||
else | ||
mv "$SOURCE" "$TARGET" | ||
fi | ||
|
||
rm -rf "$PARENT_DIR" | ||
} | ||
|
||
extract_move_delete "selenium-manager_linux-x64/selenium-manager.tar" "common/manager/linux" | ||
extract_move_delete "selenium-manager_macos-universal/selenium-manager.tar" "common/manager/macos" | ||
extract_move_delete "selenium-manager_windows-x32/selenium-manager.exe" "common/manager/windows" |