2 #lynx does not support file upload in a multipart/form-data form
6 curl
=/nyan
/curl
/current
/bin
/curl
8 url
=https
://bugs.freedesktop.org
14 while test -z "$Bugzilla_login_token"
19 --cookie-jar $cookies \
21 "$url/index.cgi?GoAheadAndLogIn=1"
23 Bugzilla_login_token
=$
(cat $html |
tr -d '\n' |
sed 's/^.*Bugzilla_login_token"[[:space:]]\{1,\}value="\([^"]*\)".*$/\1/')
24 echo Bugzilla_login_token
=$Bugzilla_login_token
28 Bugzilla_login
=sylvain.bertrand\@gmail.com
29 Bugzilla_password
=root
34 --cookie-jar $cookies \
35 --data-urlencode "Bugzilla_login=$Bugzilla_login" \
36 --data-urlencode "Bugzilla_password=$Bugzilla_password" \
37 --data-urlencode "Bugzilla_restrictlogin=checked" \
38 --data-urlencode "GoAheadAndLogIn=1" \
39 --data-urlencode "Bugzilla_login_token=$Bugzilla_login_token" \
40 --data-urlencode "GoAheadAndLogIn=Log in" \
41 "$url/index.cgi" >/dev
/null
44 #*******************************************************************************
51 --cookie-jar $cookies \
53 "$url/attachment.cgi?bugid=$1&action=enter"
55 attachment_token
=$
(cat $html |
tr -d '\n' |
sed 's/^.*name="token"[[:space:]]\{1,\}value="\([^"]*\)".*$/\1/')
56 echo attachment_token
=$attachment_token
59 if test -z "$attachment_token"; then
67 --cookie-jar $cookies \
69 --form "action=insert" \
70 --form "token=$attachment_token" \
72 --form "contenttypemethod=manual" \
73 --form "contenttypeentry=$3" \
74 --form "description=$4" \
75 --form "submit=Submit" \
76 "$url/attachment.cgi" >/dev
/null