tools: some nbsd_ports fixes

. figure out which dates were used for various nbsd imports
	  and specify them for each one in the nbsd_ports file
	. other minor fixes and improvements
This commit is contained in:
Ben Gras
2012-03-13 02:07:22 +01:00
parent 9e56468d6c
commit 6cdfedc12c
3 changed files with 83 additions and 64 deletions

View File

@@ -1,6 +1,15 @@
#!/bin/sh
echo "Updating $3"
diff -ru $1 $2 | \
diff=$3
rm -f "$diff"
if [ ! -d "$1" -o ! -d "$2" ]
then echo Skipping $diff
exit 0
fi
diff -aru $1 $2 | \
sed /"^Only in"/d | \
sed -e 's/^\(---.*\)\t.*/\1/' | \
sed -e 's/^\(\+\+\+.*\)\t.*/\1/' > $3
sed -e 's/^\(\+\+\+.*\)\t.*/\1/' > $diff
if [ ! -s "$diff" ]
then rm -f "$diff"
fi