aboutsummaryrefslogtreecommitdiff
path: root/testdata/local/put.aww
AgeCommit message (Collapse)Author
2026-02-15all: fix chmod/chown if destination is directoryShulhan
Given the following command #put!+0644 src/file dst/ If the dst is a directory, it would cause the directory permission changes to 0644. This changes fix it by checking if the destination is a directory first. If we cannot stat the dst, skip the chmod/chown command.
2025-10-03all: add option "$noparse" for magic "#put" commandShulhan
The "$noparse" option allow copying file without reading and parsing the input file.
2023-12-16all: make the magic line "#put:" use explicit source for encrypted fileShulhan
Previously, the magic line "#put" detect whether the source file is encrypted or not automatically, so we did not need to put ".vault" suffix in the source path. This changes make it to be always explicit. If we want to copy encrypted file than the source file must be the path to encrypted file. Implements: https://todo.sr.ht/~shulhan/awwan/7
2023-10-21all: implement local "#get!" and "#put!" with owner and modeShulhan
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.
2023-10-21all: implement local "#get:" and "#put:" with owner and modeShulhan
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.
2023-10-14all: add integration tests for local "#put!"Shulhan
2023-09-27all: make .Vars, .Val, and .Vals panic if values is emptyShulhan
This is to prevent copying or executing command with value that are not defined or typo which make the result empty and may result in undefined behaviour. For example if we have "app_dir = /data/app" and command in the script that remove that directory recursively, sudo rm -r {{.Val "::app_dir}}/bin will result removing "/bin" entirely.