summaryrefslogtreecommitdiffhomepage
path: root/scripts/osm/osm.api.changeset.create
blob: ed2601aef075de7c02984919422f156250771d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

echo -n "type comment: "
read comment

info="<osm>
        <changeset>
          <tag k='comment' v='$comment'/>
          <tag k='created_by' v='bash script'/>
          <tag k='bot' v='yes'/>
        </changeset>
      </osm>
     "

changeset_id=$(echo $info |\
               curl -u $OSM_USER_PASSWD --upload-file - $OSM_API/changeset/create |\
               tail -1)

echo
echo "changeset created, check $OSM_SERVER/changeset/$changeset_id"
echo "$changeset_id is copied into clipboard"