mirror of
https://github.com/owncast/owncast.git
synced 2024-12-19 15:56:47 +03:00
44 lines
839 B
Bash
44 lines
839 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
set -o errexit
|
||
|
set -o pipefail
|
||
|
|
||
|
rm -rf ./screenshots
|
||
|
mkdir -p ./screenshots
|
||
|
|
||
|
curl -o ./BrowserStackLocal-linux-x64.zip https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
|
||
|
unzip -o ./BrowserStackLocal-linux-x64.zip
|
||
|
./BrowserStackLocal --key $BROWSERSTACK_KEY &
|
||
|
|
||
|
finish() {
|
||
|
killall BrowserStackLocal
|
||
|
kill_with_kids "$STREAM_PID"
|
||
|
}
|
||
|
|
||
|
trap finish EXIT TERM INT
|
||
|
|
||
|
npm install --silent >/dev/null
|
||
|
source ../tools.sh
|
||
|
install_ffmpeg
|
||
|
start_owncast
|
||
|
|
||
|
# Offline screenshots
|
||
|
FILE_SUFFIX="offline" node index.js
|
||
|
|
||
|
# Online screenshots
|
||
|
start_stream
|
||
|
sleep 20
|
||
|
|
||
|
FILE_SUFFIX="online" node index.js
|
||
|
|
||
|
SCREENSHOTS="$(pwd)/screenshots"
|
||
|
echo $SCREENSHOTS
|
||
|
|
||
|
# Change to the root directory of the repository
|
||
|
cd "$(git rev-parse --show-toplevel)"
|
||
|
|
||
|
cd web/.storybook/story-assets
|
||
|
rm -rf ./screenshots
|
||
|
mv "$SCREENSHOTS" .
|