|
|
|
@ -4,35 +4,37 @@ MACOS_FILE=roles/macos/vars/main.yml
@@ -4,35 +4,37 @@ MACOS_FILE=roles/macos/vars/main.yml
|
|
|
|
|
|
|
|
|
|
description() { |
|
|
|
|
application=$1 |
|
|
|
|
disabled=$2 |
|
|
|
|
|
|
|
|
|
app_name=$(cut -d ' ' -f 2 <<<"$application") |
|
|
|
|
app_page=$(cut -d ' ' -f 4 <<<"$application") |
|
|
|
|
app_dscr=$(cut -d ' ' -f 5- <<<"$application") |
|
|
|
|
|
|
|
|
|
printf -- "- [%s](%s) - %s\n" "$app_name" "$app_page" "$app_dscr" |
|
|
|
|
if [ -n "$disabled" ]; then |
|
|
|
|
marks="~~" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
printf -- "- %s[%s](%s) - %s%s\n" "$marks" "$app_name" "$app_page" "$app_dscr" "$marks" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MACOS_APPS=$(grep -E '^\s*(#\s)?-\s+[^:-]+\s+#\s*http.+$' "$MACOS_FILE" \ |
|
|
|
|
| sort \ |
|
|
|
|
| expand \ |
|
|
|
|
| sort \ |
|
|
|
|
| sed -E 's/[[:space:]]+/ /g; s/^[[:space:]]*//' |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
MACOS_ENABLED=$(grep -v '^#' <<<"$MACOS_APPS") |
|
|
|
|
MACOS_DISABLED=$(grep '^#' <<<"$MACOS_APPS" | cut -d ' ' -f 2-) |
|
|
|
|
|
|
|
|
|
apps_macos_enabled="" |
|
|
|
|
apps_macos_disabled="" |
|
|
|
|
apps_macos="" |
|
|
|
|
|
|
|
|
|
while read -r app; do |
|
|
|
|
apps_macos_enabled+=$(description "$app") |
|
|
|
|
apps_macos_enabled+='\n' |
|
|
|
|
done <<<"$MACOS_ENABLED" |
|
|
|
|
disabled= |
|
|
|
|
if [ "${app:0:1}" == '#' ]; then |
|
|
|
|
app=$(cut -d ' ' -f 2- <<<"$app") |
|
|
|
|
disabled=1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
while read -r app; do |
|
|
|
|
apps_macos_disabled+=$(description "$app") |
|
|
|
|
apps_macos_disabled+='\n' |
|
|
|
|
done <<<"$MACOS_DISABLED" |
|
|
|
|
apps_macos+=$(description "$app" "$disabled") |
|
|
|
|
apps_macos+='\n' |
|
|
|
|
done <<<"$MACOS_APPS" |
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
|
@ -68,13 +70,7 @@ $ make
@@ -68,13 +70,7 @@ $ make
|
|
|
|
|
|
|
|
|
|
### Applications |
|
|
|
|
|
|
|
|
|
#### Enabled |
|
|
|
|
|
|
|
|
|
$apps_macos_enabled |
|
|
|
|
|
|
|
|
|
#### Disabled |
|
|
|
|
|
|
|
|
|
$apps_macos_disabled |
|
|
|
|
$apps_macos |
|
|
|
|
|
|
|
|
|
### Other |
|
|
|
|
|
|
|
|
|