diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/generate_clean_mas_apps.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/generate_clean_mas_apps.sh b/scripts/generate_clean_mas_apps.sh index b1ea2ab..ee66d70 100755 --- a/scripts/generate_clean_mas_apps.sh +++ b/scripts/generate_clean_mas_apps.sh @@ -14,7 +14,7 @@ if [[ -z "${apps}" ]]; then exit 0 fi -output="masApps = {\n" +output="# This file is generated by scripts/generate_clean_mas_apps.sh\n# Last updated: $(date)\n\n{\n homebrew.masApps = {\n" while IFS= read -r line; do app_id=$(echo "${line}" | awk '{print $1}') @@ -25,17 +25,17 @@ while IFS= read -r line; do sed 's/^[[:space:]]*//;s/[[:space:]]*$//') if [[ "${app_name}" =~ [[:space:]] ]]; then - output+=" \"${app_name}\" = ${app_id};\n" + output+=" \"${app_name}\" = ${app_id};\n" else - output+=" ${app_name} = ${app_id};\n" + output+=" ${app_name} = ${app_id};\n" fi done <<<"${apps}" -output+="};" +output+=" };\n}" # echo -e "${output}" -output_file="mas_apps.nix" +output_file="modules/mac/programs/homebrew/mas-apps.nix" echo -e "${output}" >"${output_file}" echo "write to ${output_file}" |