We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca6ded1 commit 93a9741Copy full SHA for 93a9741
shared/templates/file_owner/tests/missing_file_test.pass.sh
@@ -1,8 +1,18 @@
1
#!/bin/bash
2
#
3
4
-{{% if MISSING_FILE_PASS %}}
5
- rm -f {{{ FILEPATH }}}
6
-{{% else %}}
7
- true
8
-{{% endif %}}
+{{% for path in FILEPATH %}}
+ {{% if MISSING_FILE_PASS %}}
+ rm -f {{{ path }}}
+ {{% else %}}
+ {{% if IS_DIRECTORY and RECURSIVE %}}
9
+ find -L {{{ path }}} -type d -exec chown {{{ FILEUID }}} {} \;
10
11
+ if [ ! -f {{{ path }}} ]; then
12
+ mkdir -p "$(dirname '{{{ path }}}')"
13
+ touch {{{ path }}}
14
+ fi
15
+ chown {{{ FILEUID }}} {{{ path }}}
16
+ {{% endif %}}
17
18
+{{% endfor %}}
0 commit comments