#!/bin/bash

background="${1}"
if [[ -z "${background}" ]]; then
  echo "must enter background"
  echo "$0 torgo:backgrounds/1.png"
  exit 1
fi


grep setBackground * -R|cut -f1 -d':'|sort -u|grep '.txt$'|while read line; do
  sed -i 's@setBackground.*@setBackground("'${background}'")@' "${line}"
done
