Last active
November 9, 2025 08:17
-
-
Save Hayao0819/b63926109f83f0880011584b37ddbffd to your computer and use it in GitHub Desktop.
Intel SGX for Fish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env fish | |
| if test (count $argv) -eq 0 | |
| set SGX_SDK_DIR /opt/intel/sgxsdk | |
| else | |
| set SGX_SDK_DIR $argv[1] | |
| end | |
| set OUTPUT_FILE "$SGX_SDK_DIR/environment.fish" | |
| if not test -d "$SGX_SDK_DIR" | |
| echo "Error: Directory '$SGX_SDK_DIR' not found." >&2 | |
| exit 1 | |
| end | |
| echo $OUTPUT_FILE | |
| set SCRIPT_CONTENT " | |
| set -gx SGX_SDK '$SGX_SDK_DIR' | |
| set -gx PATH \$PATH \$SGX_SDK/bin \$SGX_SDK/bin/x64 | |
| set -gx PKG_CONFIG_PATH \$PKG_CONFIG_PATH \$SGX_SDK/pkgconfig | |
| if not set -q LD_LIBRARY_PATH | |
| set -gx LD_LIBRARY_PATH \$SGX_SDK/sdk_libs | |
| else | |
| set -gx LD_LIBRARY_PATH \$LD_LIBRARY_PATH \$SGX_SDK/sdk_libs | |
| end | |
| " | |
| echo $SCRIPT_CONTENT > $OUTPUT_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment