You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
570 B
JSON
27 lines
570 B
JSON
{
|
|
"description": "Fetch a remote file via HTTP GET request.",
|
|
"functions": {
|
|
"file-download": [
|
|
{
|
|
"code": "lwp-download [url] [file]\n"
|
|
}
|
|
],
|
|
"sudo": [
|
|
{
|
|
"code": "sudo lwp-download [url] [file]\n"
|
|
}
|
|
],
|
|
"file-read": [
|
|
{
|
|
"description": "The file path must be absolute.",
|
|
"code": "TF=$(mktemp)\nlwp-download \"file://[file]\" $TF\ncat $TF\n"
|
|
}
|
|
],
|
|
"file-write": [
|
|
{
|
|
"code": "TF=$(mktemp)\necho [data] >$TF\nlwp-download file://$TF [file]\n"
|
|
}
|
|
]
|
|
}
|
|
}
|