Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Instructions: Set your logDir variable here to point to your StarMade install's log folder. Then run this script and it should tell you when a blueprint download starts and finishes.
- logDir="/home/YourUserName/.steam/steam/steamapps/common/StarMade/StarMade/logs/"
- echo "Remember to press CTRL + C when done!" ; set -f
- while read -r b; do
- if [[ "${b}" == *"REQUESTED EXTRA INFO FOR LOCAL BLUEPRINT"* ]]; then
- shipName=$(echo "${b}" | grep -Po "Ship\[[A-Za-z0-9_ -]*" | sed 's/^Ship\[//g')
- echo "Ship blueprint download started for entity, '${shipName}'."
- then=$(date '+%s')
- elif [[ "${b}" == *"SAVED LOCAL BLUEPRINT"* ]]; then
- now=$(date "+%s")
- shipName=$(echo "${b}" | grep -Po "Ship\[[A-Za-z0-9_ -]*" | sed 's/^Ship\[//g')
- echo "Ship save finished for entity, '${shipName}'! Save took $((now - then)) seconds!"
- unset now
- unset then
- fi
- done < <(tail -n0 -q -F "${logDir}logstarmade.0.log" 2>/dev/null | stdbuf -i0 -o0 grep --line-buffered "\[CLIENT\]\[PLAYER\]\[BLUEPRINT\]")
Add Comment
Please, Sign In to add comment