1
0
mirror of https://github.com/ViViDboarder/shoestrap.git synced 2025-01-11 16:53:28 +00:00
shoestrap/assets/default/bin/gh-am

17 lines
238 B
Bash
Executable File

#! /bin/bash
# gh-am Applies a Github PR as a patch
# Author: ViViDboarder
set -e
get_patch() {
local pr_url=$1
curl -L "${pr_url}.patch" 2> /dev/null
}
main() {
local pr_url=$1
get_patch "$pr_url" | git am
}
main "$1"