diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-21 12:09:28 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-21 12:09:28 +0700 |
| commit | 6d55c5d801c933ee39294619b349c4bad33265ef (patch) | |
| tree | a7dc78d3121d57b233fe41d76d4b1c64ec33a45d /testdata | |
| parent | 664c121f5d52364901100b817e1fa641d245fad0 (diff) | |
| download | awwan-6d55c5d801c933ee39294619b349c4bad33265ef.tar.xz | |
all: implement local "#get!" and "#put!" with owner and mode
In local environment, using magic command "#get!" or "#put!" with owner
and mode set, like "#get:$USER:$GROUP+$MODE" or "#put:$USER:$GROUP+MODE",
will changes the file owner to $USER or $GROUP and/or permission to $MODE.
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 f4f4dc8..ddc2bd4 100644 --- a/testdata/local/get.aww +++ b/testdata/local/get.aww @@ -5,3 +5,7 @@ #get:+0561 {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_with_mode.txt #get:root:root {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_with_owner.txt + +#get!+0706 /etc/os-release {{.ScriptDir}}/tmp/sudoget_with_mode.txt + +#get!awwan:bin /etc/os-release {{.ScriptDir}}/tmp/sudoget_with_owner.txt diff --git a/testdata/local/put.aww b/testdata/local/put.aww index d26fd55..c67f9c3 100644 --- a/testdata/local/put.aww +++ b/testdata/local/put.aww @@ -10,3 +10,7 @@ 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 + +#put!+0516 {{.ScriptDir}}/plain.txt /etc/sudoput_with_mode.txt + +#put!awwan:bin+0644 {{.ScriptDir}}/plain.txt /etc/sudoput_with_owner.txt |
