source: subversion/applications/utils/import/bulkupload/diffpatch @ 34714

Last change on this file since 34714 was 19408, checked in by avar, 10 years ago

Add bulk upload scripts from http://openstreetmap.pl/balrog/bulkupload/ by balrog-k1n, he doesn't have svn access so I'm commiting this for him

File size: 270 bytes
Line 
1#! /bin/bash
2[ $# -ge 2 ] || exit -1
3
4fn="$1"
5shift
6grep old_id "$fn" | \
7while read line; do
8        old=`echo "$line" | grep -o 'old_id="[0-9-]*'`
9        new=`echo "$line" | grep -o 'new_id="[0-9-]*'`
10        old=${old:8}
11        new=${new:8}
12        sed -i "s/ref=\"${old}\"/ref=\"${new}\"/g" $*
13done
Note: See TracBrowser for help on using the repository browser.