This script allows you to very easily create PRs for MT-CTF/maps.
There are a couple of hard-coded variables in the script, which need to be set before the first run. I didn't bother to make these configurable via command-line args because these variables usually need to be set only once.
MAPSREPO
(L7): This should contain the path to the local maps repository. This needs to be an absolute path. e.g./home/test_user/new_super_duper_awesome_map_that_will_get_rejected_immediately/
USERNAME
(L8): This should contain your GitHub username. You'll need to authenticate, as the PR will be made in your name.
Also, don't forget to mark the script as executable.
Syntax:
maps_pr.sh <MAPDIR>
MAPDIR
is the path to the new map's directory containing the map's files. Relative paths are allowed.
Examples:
maps_pr.sh ~/new_map/ # From anywhere
cd ~/
maps_pr.sh new_map/ # From parent directory
cd new_map/
maps_pr.sh . # From within the map directory