Open greenhandzdl opened 1 month ago
Documents/develop/c ❯ cat test_gcc_locale.sh #!/bin/bash # 设置环境变量 export LANGUAGE=zh_CN_hentai export TEXTDOMAINDIR=~/Library/locale export TEXTDOMAIN=gcc # 设置 GCC 路径 GCC_PATH=/opt/homebrew/opt/gcc@14/bin/gcc-14 # 运行 Homebrew 安装的 GCC 并捕获输出 gcc_output=$($GCC_PATH --version) # 打印输出 echo "$gcc_output" Documents/develop/c ❯ ./test_gcc_locale.sh gcc-14 (Homebrew GCC 14.1.0_2) 14.1.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Documents/develop/c ❯ tree ~/Library/locale /Users/greenhandzdl/Library/locale └── zh_CN_hentai ├── LC_COLLATE ├── LC_CTYPE ├── LC_MESSAGES │ ├── LC_MESSAGES │ └── gcc.mo ├── LC_MONETARY ├── LC_NUMERIC └── LC_TIME 3 directories, 7 files