File: dpatch

package info (click to toggle)
xboing 2.4-26.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,108 kB
  • ctags: 1,516
  • sloc: ansic: 17,999; sh: 51; makefile: 44
file content (26 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh -e

case "$1" in
  patch)
    if [ ! -e patch-stamp ]; then
      for i in `ls  debian/patches/*.diff`; do 
        patch -p0 < $i
      done
      touch patch-stamp
    fi
  ;;
  clean)
    if [ -e patch-stamp ]; then
      for i in `ls -r debian/patches/*.diff`; do 
        patch -R -p0 < $i
      done
      rm patch-stamp
    fi
  ;;
  *)
    echo "dpatch called with unknown argument [$1]" >&2
    exit 1
  ;;
esac

exit 0