Skip to content

Commit

Permalink
Refactor file processing logic in jq command
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nj5m1n committed Jan 7, 2024
1 parent 1fd2631 commit 21c63ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdg-ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ do_check_programs() {
" read -r name; read -r filename; read -r movable; read -r help; do
check_file "$name" "$filename" "$movable" "$help"
done <<EOF
$(jq 'if type == "object" then .files[] as $file | .name, $file.path, $file.movable, $file.help else . end' "$XN_PROGRAMS_DIR"/* | sed -e 's/^"//' -e 's/"$//')
$(jq '.files[] as $file | .name, $file.path, $file.movable, $file.help' "$XN_PROGRAMS_DIR"/* | sed -e 's/^"//' -e 's/"$//')
EOF
# sed is to trim quotes
}
Expand Down

0 comments on commit 21c63ce

Please # to comment.