File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77{{%- if RECURSIVE %}}
88{{%- set FIND_RECURSE_ARGS="" %}}
99{{%- else %}}
10- {{%- set FIND_RECURSE_ARGS="-maxdepth 1" %}}
10+ {{%- set FIND_RECURSE_ARGS="-maxdepth 1 -L " %}}
1111{{%- endif %}}
1212
1313{{%- for path in FILEPATH %}}
1414{{%- if IS_DIRECTORY %}}
1515{{%- if FILE_REGEX %}}
1616
17- find {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -group {{{ GID_OR_NAME }}} -regextype posix-extended -regex '{{{ FILE_REGEX[loop.index0] }}}' -exec chgrp {{{ GID_OR_NAME }}} {} \;
17+ find {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -group {{{ GID_OR_NAME }}} -regextype posix-extended -regex '{{{ FILE_REGEX[loop.index0] }}}' -exec chgrp -L {{{ GID_OR_NAME }}} {} \;
1818{{%- else %}}
19- find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type d -exec chgrp {{{ GID_OR_NAME }}} {} \;
19+ find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type d -exec chgrp -L {{{ GID_OR_NAME }}} {} \;
2020{{%- endif %}}
2121{{%- else %}}
22- chgrp {{{ GID_OR_NAME }}} {{{ path }}}
22+ chgrp -L {{{ GID_OR_NAME }}} {{{ path }}}
2323{{%- endif %}}
2424{{%- endfor %}}
Original file line number Diff line number Diff line change 77{{%- if RECURSIVE %}}
88{{%- set FIND_RECURSE_ARGS="" %}}
99{{%- else %}}
10- {{%- set FIND_RECURSE_ARGS="-maxdepth 1" %}}
10+ {{%- set FIND_RECURSE_ARGS="-maxdepth 1 -L " %}}
1111{{%- endif %}}
1212
1313{{%- for path in FILEPATH %}}
1414{{%- if IS_DIRECTORY %}}
1515{{%- if FILE_REGEX %}}
1616
17- find {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -uid {{{ FILEUID }}} -regextype posix-extended -regex '{{{ FILE_REGEX[loop.index0] }}}' -exec chown {{{ FILEUID }}} {} \;
17+ find {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type f ! -uid {{{ FILEUID }}} -regextype posix-extended -regex '{{{ FILE_REGEX[loop.index0] }}}' -exec chown -L {{{ FILEUID }}} {} \;
1818{{%- else %}}
19- find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type d -exec chown {{{ FILEUID }}} {} \;
19+ find -H {{{ path }}} {{{ FIND_RECURSE_ARGS }}} -type d -exec chown -L {{{ FILEUID }}} {} \;
2020{{%- endif %}}
2121{{%- else %}}
22- chown {{{ FILEUID }}} {{{ path }}}
22+ chown -L {{{ FILEUID }}} {{{ path }}}
2323{{%- endif %}}
2424{{%- endfor %}}
You can’t perform that action at this time.
0 commit comments