planet-wars/frontend/build_games.sh

15 lines
308 B
Bash
Raw Normal View History

2019-09-21 18:56:46 +02:00
#!/bin/bash
echo "path=$(pwd | sed 's/.*\/static/static/')/"
for var in "$@"
do
echo
echo "[$var]"
echo "name=$(basename -- $var | sed 's/\..*//')"
echo "turns=$(wc -l $var | sed 's/ .*//')"
echo "players=$(grep players $var | sed 's/"players"://' | tr -d "{}[]'" | tr ',' ' ')"
done