-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathsubmit
More file actions
40 lines (34 loc) · 787 Bytes
/
submit
File metadata and controls
40 lines (34 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
##################################################
# submit working draft to IETF via API
# from https://datatracker.ietf.org/api/submit/
# 2020-08 : @mamund
##################################################
# local args
url="https://datatracker.ietf.org/api/submit "
# check for folder/doc
# arg is draft-02 where
# the subfolder/file is draft-02/draft-02.xml
if [ -z "$1" ]
then
echo "No document supplied"
echo "$0 <folder> <user>"
exit
fi
# check for username
# MUST be a valid IETF datatracker account
if [ -z "$2" ]
then
echo "No user supplied"
echo "$0 <folder> <user>"
exit
fi
# do the work
echo "user=$2"
echo "xml=$1/$1.xml"
echo "posting to $url..."
curl -S -F "user=$2" -F "xml=@$1/$1.xml" $url
echo "job completed."
#
# EOF
#