Create PATCHDIR if first call of update-patches

This commit is contained in:
espie 2000-06-09 17:08:37 +00:00
parent e31b9ea46c
commit 88dcba4ede

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $OpenBSD: update-patches,v 1.2 2000/06/07 00:47:47 espie Exp $ # $OpenBSD: update-patches,v 1.3 2000/06/09 17:08:37 espie Exp $
# Copyright (c) 2000 # Copyright (c) 2000
# Marc Espie. All rights reserved. # Marc Espie. All rights reserved.
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -31,6 +31,7 @@ while read file
do do
echo 1>&2 "Processing $file" echo 1>&2 "Processing $file"
# look in patchdir for an existing patchfile matching this # look in patchdir for an existing patchfile matching this
mkdir -p $PATCHDIR
cd $PATCHDIR cd $PATCHDIR
for i in ${PATCH_LIST} for i in ${PATCH_LIST}
do do
@ -64,7 +65,7 @@ do
# Build a sensible name for the patch file # Build a sensible name for the patch file
patchname=patch-`echo $file|sed -e s,[/.],_,g` patchname=patch-`echo $file|sed -e s,[/.],_,g`
echo 1>&2 "No patch-* found for $file, creating $patchname" echo 1>&2 "No patch-* found for $file, creating $patchname"
{ echo '$OpenBSD: update-patches,v 1.2 2000/06/07 00:47:47 espie Exp $'; (cd $WRKDIST && diff ${DIFF_ARGS} -u -p $file.orig $file) } >$patchname { echo '$OpenBSD: update-patches,v 1.3 2000/06/09 17:08:37 espie Exp $'; (cd $WRKDIST && diff ${DIFF_ARGS} -u -p $file.orig $file) } >$patchname
edit="$edit $patchname" edit="$edit $patchname"
accounted="$accounted $patchname" accounted="$accounted $patchname"
done done
@ -87,7 +88,7 @@ do
esac esac
done done
# Check for $Id: update-patches,v 1.2 2000/06/07 00:47:47 espie Exp $ and similar bugs in all those patch files. # Check for $Id: update-patches,v 1.3 2000/06/09 17:08:37 espie Exp $ and similar bugs in all those patch files.
for i in $accounted for i in $accounted
do do
if sed -e '/1,^---/ d' $i|grep '$(Id|OpenBSD' if sed -e '/1,^---/ d' $i|grep '$(Id|OpenBSD'