diff options
-rwxr-xr-x | tools/osm/osm.api.changeset.commit | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/osm/osm.api.changeset.commit b/tools/osm/osm.api.changeset.commit index 5182e3b..5861750 100755 --- a/tools/osm/osm.api.changeset.commit +++ b/tools/osm/osm.api.changeset.commit | |||
@@ -15,11 +15,11 @@ if [ -z ${OSM_USER_PASSWD} ]; then | |||
15 | read -e -p 'Type USER:PASSWD: ' -r OSM_USER_PASSWD </dev/tty | 15 | read -e -p 'Type USER:PASSWD: ' -r OSM_USER_PASSWD </dev/tty |
16 | fi | 16 | fi |
17 | 17 | ||
18 | # Create changeset with given information | 18 | create_changeset() { |
19 | curl ${OSM_API}/changeset/create \ | 19 | curl ${OSM_API}/changeset/create \ |
20 | --user ${OSM_USER_PASSWD} \ | 20 | --user ${OSM_USER_PASSWD} \ |
21 | --upload-file - \ | 21 | --upload-file - \ |
22 | <<EOF | tail -1 | changeset_id=$(cat) | 22 | <<EOF | tail -1 |
23 | <osm> | 23 | <osm> |
24 | <changeset> | 24 | <changeset> |
25 | <tag k='comment' v='${comment}'/> | 25 | <tag k='comment' v='${comment}'/> |
@@ -28,6 +28,10 @@ curl ${OSM_API}/changeset/create \ | |||
28 | </changeset> | 28 | </changeset> |
29 | </osm> | 29 | </osm> |
30 | EOF | 30 | EOF |
31 | } | ||
32 | |||
33 | # Create changeset with given information | ||
34 | changeset_id=$(create_changeset) | ||
31 | 35 | ||
32 | # Print created changeset id | 36 | # Print created changeset id |
33 | echo >/dev/tty | 37 | echo >/dev/tty |