| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doIdentityTextFormats { |
| |
| |
| local FILE="$1" |
| |
| |
| local OPTIONS=$(echo "$2" | cut -d: -f2-) |
| |
| |
| |
| |
| OPTIONS=$(echo "$OPTIONS" | sed -r 's!--(version|help)!!g') |
| |
| |
| |
| local FILE_FORMAT=$(file $FILE | cut -d' ' -f2) |
| |
| |
| case $FILE_FORMAT in |
| |
| ASCII | UTF-8 ) |
| |
| |
| |
| cat $FILE | fmt $(echo -n "$OPTIONS") > ${FILE}.fmt |
| mv ${FILE}.fmt $FILE |
| ;; |
| |
| esac |
| |
| } |