Skip to content

Instantly share code, notes, and snippets.

@cam8001
Last active December 6, 2024 20:29
Show Gist options
  • Select an option

  • Save cam8001/9307192 to your computer and use it in GitHub Desktop.

Select an option

Save cam8001/9307192 to your computer and use it in GitHub Desktop.

Revisions

  1. cam8001 revised this gist Mar 2, 2014. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions dapply
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,15 @@
    #!/bin/bash

    # Downloads and applies a patch from Drupal.org.
    if [ -z "$1" ]
    then
    echo "You need to supply a URL to a patch file."
    exit
    fi

    URL=$1;

    # Download a patch and apply it.
    curl $URL | git apply -v --index
    # Commits patch and adds a log message.
    git commit -m "Applied $URL."
    # Commit patch and add a log message.
    git commit -m "Applied $URL."
  2. cam8001 revised this gist Mar 2, 2014. 1 changed file with 0 additions and 0 deletions.
    Empty file modified dapply
    100644 → 100755
    Empty file.
  3. cam8001 created this gist Mar 2, 2014.
    9 changes: 9 additions & 0 deletions dapply
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash

    # Downloads and applies a patch from Drupal.org.
    URL=$1;

    # Download a patch and apply it.
    curl $URL | git apply -v --index
    # Commits patch and adds a log message.
    git commit -m "Applied $URL."