feat: run-and-kill script (#6188)
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
- Dev: Removed authenticated PubSub implementation. (#6158)
|
- Dev: Removed authenticated PubSub implementation. (#6158)
|
||||||
- Dev: Save settings in `aboutToQuit`. (#6159)
|
- Dev: Save settings in `aboutToQuit`. (#6159)
|
||||||
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
|
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
|
||||||
|
- Dev: Added a `run-and-kill.sh` script to help debug crash-on-exit bugs. (#6188)
|
||||||
- Dev: Updated GoogleTest to v1.17.0. (#6180)
|
- Dev: Updated GoogleTest to v1.17.0. (#6180)
|
||||||
- Dev: Mini refactor of `TwitchAccount`. (#6182)
|
- Dev: Mini refactor of `TwitchAccount`. (#6182)
|
||||||
- Dev: Simplified string literals to be a re-export of Qt functions. (#6175)
|
- Dev: Simplified string literals to be a re-export of Qt functions. (#6175)
|
||||||
|
|||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# This is a script that runs then kills chatterino at random intervals
|
||||||
|
# You can modify the _min_ms and _rand_ms to change how often they're killed
|
||||||
|
|
||||||
|
_min_ms="1000"
|
||||||
|
_rand_ms="8000"
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "usage: $0 <path_to_chatterino_bin_to_run> (e.g. $0 ./build-mold/bin/chatterino)"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
bin_to_run="$1"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
sleep_time_ms=$(( RANDOM % _rand_ms + _min_ms ))
|
||||||
|
sleep_time="$(echo "${sleep_time_ms}/1000" | bc)"
|
||||||
|
|
||||||
|
$bin_to_run &
|
||||||
|
pid=$!
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ">>>>>>> SLEEPING FOR ${sleep_time}s"
|
||||||
|
|
||||||
|
(sleep "$sleep_time" && echo "" && echo "<<<<<<<<<<<<< TRY KILL" && kill -SIGINT "$pid") &
|
||||||
|
|
||||||
|
wait "$pid"
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user