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

View file

@ -989,8 +989,8 @@ get_distro() {
"Solaris")
case "$distro_shorthand" in
"on" | "tiny") distro="$(awk 'NR==1{print $1 " " $3;}' /etc/release)" ;;
*) distro="$(awk 'NR==1{print $1 " " $2 " " $3;}' /etc/release)" ;;
"on" | "tiny") distro="$(awk 'NR==1 {print $1,$3}' /etc/release)" ;;
*) distro="$(awk 'NR==1 {print $1,$2,$3}' /etc/release)" ;;
esac
distro="${distro/\(*}"
;;
@ -2862,13 +2862,13 @@ END
;;
"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")"
;;
"GNUstep_Terminal")
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")"
;;
@ -2892,7 +2892,7 @@ END
/^([[:space:]]*|[^#_])font_size[[:space:]]+/ {
size = $2
}
END { print font " " size}' "${confs[0]}")"
END {print font,size}' "${confs[0]}")"
;;
"konsole" | "yakuake")
@ -2919,7 +2919,7 @@ END
profile_filename="${profile_filename/$'\n'*}"
[[ "$profile_filename" ]] && \
term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")"
term_font="$(awk -F '=|,' '/Font=/ {print $2,$3}' "$profile_filename")"
;;
"lxterminal"*)
@ -2978,7 +2978,7 @@ END
;;
"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")"
;;