aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/osm/osm.api.changeset.create
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2020-08-14 23:48:24 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2020-08-14 23:48:24 +0800
commitc399514613db31b58f1ddb635aa92f9848ae79c0 (patch)
tree6de14da4e87fbea3f219d3a175a46367c62daa75 /tools/osm/osm.api.changeset.create
parent8d595c8820db2691b1663b7780c2ba9830c3982a (diff)
parentfa8e54331302e8d640cab17a6ce4cbc2ee4598a5 (diff)
Merge branch 'dev' of github.com:typebrook/settings into dev
Diffstat (limited to 'tools/osm/osm.api.changeset.create')
-rwxr-xr-xtools/osm/osm.api.changeset.create14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/osm/osm.api.changeset.create b/tools/osm/osm.api.changeset.create
index ed2601a..bdbf53a 100755
--- a/tools/osm/osm.api.changeset.create
+++ b/tools/osm/osm.api.changeset.create
@@ -1,7 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo -n "type comment: " 3set -e
4read comment 4
5read -e -p 'Type comment: ' -r comment </dev/tty
6if [ -z $OSM_USER_PASSWD ]; then
7 read -e -p 'Type USER:PASSWD: ' -r OSM_USER_PASSWD </dev/tty
8fi
5 9
6info="<osm> 10info="<osm>
7 <changeset> 11 <changeset>
@@ -16,6 +20,6 @@ changeset_id=$(echo $info |\
16 curl -u $OSM_USER_PASSWD --upload-file - $OSM_API/changeset/create |\ 20 curl -u $OSM_USER_PASSWD --upload-file - $OSM_API/changeset/create |\
17 tail -1) 21 tail -1)
18 22
19echo 23echo >/dev/tty
20echo "changeset created, check $OSM_SERVER/changeset/$changeset_id" 24echo "changeset created, check $OSM_SERVER/changeset/$changeset_id" >/dev/tty
21echo "$changeset_id is copied into clipboard" 25echo $changeset_id