diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-21 00:45:58 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-21 11:25:36 +0700 |
| commit | 664c121f5d52364901100b817e1fa641d245fad0 (patch) | |
| tree | 25ec1b90efebed9bdb6d710307ac6caa2c2466e5 /testdata | |
| parent | cda5c7c31a84b01e2231bed579d7f4bb6212a272 (diff) | |
| download | awwan-664c121f5d52364901100b817e1fa641d245fad0.tar.xz | |
all: implement local "#get:" and "#put:" with owner and mode
In local environment, using magic command "#get" or "#put" with mode
like "#get:$USER:$GROUP+$MODE" or "#put:$USER:$GROUP+MODE" will changes
the file owner to $USER or $GROUP and/or permission to $MODE.
The file owner does not works if user does not have permission to changes
the owner.
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/local/get.aww | 4 | ||||
| -rw-r--r-- | testdata/local/put.aww | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/testdata/local/get.aww b/testdata/local/get.aww index d889f22..f4f4dc8 100644 --- a/testdata/local/get.aww +++ b/testdata/local/get.aww @@ -1,3 +1,7 @@ #get: {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_plain.txt #get! /etc/os-release {{.ScriptDir}}/tmp/os-release + +#get:+0561 {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_with_mode.txt + +#get:root:root {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_with_owner.txt diff --git a/testdata/local/put.aww b/testdata/local/put.aww index e3040f1..d26fd55 100644 --- a/testdata/local/put.aww +++ b/testdata/local/put.aww @@ -6,3 +6,7 @@ #put! {{.ScriptDir}}/plain.txt /etc/plain.txt sudo chmod 0644 /etc/plain.txt + +#put:+0611 {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/put_with_mode.txt + +#put:audio:audio {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/put_with_owner.txt |
