Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion linux/installer/bin/install-sgx-sdk.bin.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,33 @@ fi
EOF
}

generate_environment_script_fish()
{
cat > ${SGX_PACKAGES_PATH}/${SDK_PKG_NAME}/environment.fish <<EOF
set -x SGX_SDK ${SGX_PACKAGES_PATH}/${SDK_PKG_NAME}
set -x PATH \$PATH \$SGX_SDK/$(dirname ${BIN_DIR}) \$SGX_SDK/${BIN_DIR}
set -x PKG_CONFIG_PATH \$PKG_CONFIG_PATH \$SGX_SDK/pkgconfig
if test -z "\$LD_LIBRARY_PATH"
set -x LD_LIBRARY_PATH \$SGX_SDK/sdk_libs
else
set -x LD_LIBRARY_PATH \$LD_LIBRARY_PATH \$SGX_SDK/sdk_libs
end

EOF
}

export_the_simulation
generate_environment_script
generate_environment_script_fish

echo """
Please set the environment variables with below command:
(bash) Please set the environment variables with below command:
"
echo -e "\033[32;49;1msource ${SGX_PACKAGES_PATH}/${SDK_PKG_NAME}/environment\033[39;49;0m"

echo """
(fish) Please set the environment variables with below command:
"
echo -e "\033[32;49;1msource ${SGX_PACKAGES_PATH}/${SDK_PKG_NAME}/environment.fish\033[39;49;0m"

exit 0