File: add_patch.sh

package info (click to toggle)
gpsd 3.22-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,508 kB
  • sloc: ansic: 57,097; xml: 15,491; python: 12,716; cpp: 836; sh: 699; php: 210; makefile: 188; perl: 111; javascript: 26
file content (14 lines) | stat: -rwxr-xr-x 264 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

set -e

patchpath=`dirname ${0}`

for hash in $@; do
    fname=`git log -1 --pretty=format:'%h_%f' ${hash}`
    git format-patch --stdout -N -1 ${hash} > "${fname}"
    if ! grep -q ${fname} series; then
        echo "${fname}" >> series
    fi
done