Skip to content

Instantly share code, notes, and snippets.

@juhasz
Created October 19, 2011 09:35
Show Gist options
  • Select an option

  • Save juhasz/1297851 to your computer and use it in GitHub Desktop.

Select an option

Save juhasz/1297851 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Git apply for a remote patch file
if ! [ "$1" = "" ]; then
filename=`echo $1 | sed -e 's/^.*\///'`
wget --output-document=/tmp/$filename $1
git apply /tmp/$filename
rm /tmp/$filename
else
echo 'Please give an URL to patch'
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment