| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Copyright 2008-2009 OpenCSW |
| 4 |
# |
| 5 |
# Redistribution and/or use, with or without modification, is |
| 6 |
# permitted. This software is without warranty of any kind. The |
| 7 |
# author(s) shall not be liable in the event that use of the |
| 8 |
# software causes damage. |
| 9 |
# |
| 10 |
# gar.svn.mk - Targets for working with svn |
| 11 |
|
| 12 |
# Read the comma separated ignores from stdin and merges it with any existing |
| 13 |
# ignores set on the directory. |
| 14 |
|
| 15 |
ignores=`mktemp`-ignores |
| 16 |
existing_ignores=`mktemp`-existing |
| 17 |
new_ignores=`mktemp`-new |
| 18 |
|
| 19 |
while [ "$1" != "" ]; do |
| 20 |
echo $1 >> $ignores |
| 21 |
shift |
| 22 |
done |
| 23 |
|
| 24 |
svn pg svn:ignore . > $existing_ignores |
| 25 |
cat $ignores $existing_ignores | sort | uniq > $new_ignores |
| 26 |
svn ps svn:ignore . -F $new_ignores |
| 27 |
|
| 28 |
rm -rf $ignores $existing_ignores $new_ignores |