ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ozone/mgar/gar/bin/gpatch
Revision: 1
Committed: Sat Jun 20 14:58:51 2026 UTC (4 weeks, 3 days ago) by operz
File size: 655 byte(s)
Log Message:
Initial import of OZSW mgar build tree

File Contents

# Content
1 #!/bin/sh
2 # gpatch - GNU patch wrapper for Solaris /usr/bin/patch
3 # - Converts -d<dir> to an explicit cd (Solaris patch ignores -d)
4 # - Strips -F (fuzz factor, not supported)
5 # - Passes -u explicitly so Solaris patch handles unified diffs
6 DIR=""
7 ARGS="-u"
8 skip_next=0
9 for arg in "$@"; do
10 if [ "$skip_next" = 1 ]; then
11 DIR="$arg"
12 skip_next=0
13 continue
14 fi
15 case "$arg" in
16 -F*) ;;
17 -u) ;; # already added
18 -d) skip_next=1 ;;
19 -d*) DIR="${arg#-d}" ;;
20 *) ARGS="$ARGS $arg" ;;
21 esac
22 done
23 if [ -n "$DIR" ]; then
24 cd "$DIR" || exit 1
25 fi
26 exec /usr/bin/patch $ARGS

Properties

Name Value
svn:executable *