Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help]Macos该如何操作呢 #18

Open
greenhandzdl opened this issue Aug 6, 2024 · 0 comments
Open

[Help]Macos该如何操作呢 #18

greenhandzdl opened this issue Aug 6, 2024 · 0 comments

Comments

@greenhandzdl
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant