From 0037d96d3748c91d94e4b0081cf94094585f15ac Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 3 Jan 2025 00:39:47 -0800 Subject: nara: automate mas apps generator script --- scripts/generate_clean_mas_apps.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') 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}" -- cgit v1.2.3