Merge pull request #1135 from arisinfenix/awk

Misc: Use comma syntax in awk to print spaces
This commit is contained in:
M. Herdiansyah 2018-12-11 16:32:16 +07:00 committed by GitHub
commit 10da8b3671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -989,8 +989,8 @@ get_distro() {
"Solaris") "Solaris")
case "$distro_shorthand" in case "$distro_shorthand" in
"on" | "tiny") distro="$(awk 'NR==1{print $1 " " $3;}' /etc/release)" ;; "on" | "tiny") distro="$(awk 'NR==1 {print $1,$3}' /etc/release)" ;;
*) distro="$(awk 'NR==1{print $1 " " $2 " " $3;}' /etc/release)" ;; *) distro="$(awk 'NR==1 {print $1,$2,$3}' /etc/release)" ;;
esac esac
distro="${distro/\(*}" distro="${distro/\(*}"
;; ;;
@ -2862,13 +2862,13 @@ END
;; ;;
"deepin-terminal"*) "deepin-terminal"*)
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END {print a " " b}' \ term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END {print a,b}' \
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
;; ;;
"GNUstep_Terminal") "GNUstep_Terminal")
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3} term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
/>TerminalFontSize</ {getline; s=$3} END {print f " " s}' \ />TerminalFontSize</ {getline; s=$3} END {print f,s}' \
"${HOME}/GNUstep/Defaults/Terminal.plist")" "${HOME}/GNUstep/Defaults/Terminal.plist")"
;; ;;
@ -2892,7 +2892,7 @@ END
/^([[:space:]]*|[^#_])font_size[[:space:]]+/ { /^([[:space:]]*|[^#_])font_size[[:space:]]+/ {
size = $2 size = $2
} }
END { print font " " size}' "${confs[0]}")" END {print font,size}' "${confs[0]}")"
;; ;;
"konsole" | "yakuake") "konsole" | "yakuake")
@ -2919,7 +2919,7 @@ END
profile_filename="${profile_filename/$'\n'*}" profile_filename="${profile_filename/$'\n'*}"
[[ "$profile_filename" ]] && \ [[ "$profile_filename" ]] && \
term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" term_font="$(awk -F '=|,' '/Font=/ {print $2,$3}' "$profile_filename")"
;; ;;
"lxterminal"*) "lxterminal"*)
@ -2978,7 +2978,7 @@ END
;; ;;
"qterminal") "qterminal")
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END {print a " " b}' \ term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END {print a,b}' \
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")" "${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
;; ;;