Launch mac eclipse with environment variables set

后端 未结 8 1578
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 00:16

My company provides an eclipse based development environment which needs some environment variables setting up for the underlying toolchain so multiple versions can be insta

8条回答
  •  失恋的感觉
    2020-11-29 00:33

    As pointed out in https://github.com/atom/atom/issues/7045, the environment variables can be loaded automatically, without explicit source ~/.bash_profile by using

    #!/usr/bin/env bash -l
    

    instead of

    #!/bin/bash
    source ~/.bash_profile
    

    after that, in both cases, follows

    exec "`dirname \"$0\"`/eclipse" $@
    

    It works great for me, thanks for all previous work.

提交回复
热议问题