mac: document, improve, encourage clearing logs
Previously, scripts under the 'Clear operating system logs' category for macOS were misaligned due to a lack of individual script recommendations, as the category itself wrongly used the `recommend: strict` property. This misconfiguration caused none of these scripts to appear recommended. This commit assigns accurate `recommend:` values to each script within the category. Key changes: - Introduce individual recommendations for each script. - Document scripts to justify recommendations. - Standardize deletion operations through shared functions. - Improve script and category naming for clarity. - Simplify code by unifying redundant path references. - Add comments in generated user script code. - Fix specific issue where clearing daily os logs inadvertently affected configuration files.
This commit is contained in:
@@ -3572,8 +3572,11 @@ functions:
|
||||
revertCode: '{{ with $revertCodeComment }}# {{ . }}{{ end }}'
|
||||
-
|
||||
name: DeleteFiles
|
||||
# 💡 Purpose:
|
||||
# Deletes files but does not touch any directories.
|
||||
# Use `DeleteDirectory` or `ClearDirectoryContents` to delete directories.
|
||||
parameters:
|
||||
- name: fileGlob
|
||||
- name: fileGlob # File glob pattern to delete.
|
||||
call:
|
||||
-
|
||||
function: Comment
|
||||
@@ -3976,6 +3979,7 @@ functions:
|
||||
# 💡 Purpose:
|
||||
# Empties the contents of a directory recursively (including all of its files and subfolders) while preserving
|
||||
# the directory itself.
|
||||
# This is beneficial when other applications depend on the existence of the directory.
|
||||
# Marked: refactor-with-partials
|
||||
# Same function as macOS
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user