diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml index e8ad6c121..e56628392 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/installation.yml @@ -24,7 +24,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: "Install Zsh and Tcsh" + - name: "Install zsh and tcsh" run: | if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then sudo apt-get install -y tcsh zsh @@ -32,29 +32,28 @@ jobs: brew install tcsh zsh fi - name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - bash - env: - OS: '${{ matrix.os }}' shell: bash - run: | - echo "$SHELL" + run: | + echo $SHELL pip install -U pip source setup.sh which buildtest buildtest --help - name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - zsh - env: - OS: '${{ matrix.os }}' shell: zsh {0} - run: | - echo "$SHELL" + run: | + echo $SHELL pip install -U pip source setup.sh which buildtest buildtest --help - - uses: actions/checkout@v4 - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 30 + - name: Buildtest Installation for os - ${{ matrix.os }}, python version - ${{ matrix.python-version }}, shell - csh + shell: csh {0} + run: | + echo $shell + pip install -U pip + source setup.csh + which buildtest + buildtest --help diff --git a/setup.csh b/setup.csh index bbb55865d..01f9acc1d 100755 --- a/setup.csh +++ b/setup.csh @@ -24,8 +24,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +# Get the name of the current shell +set shell_name = `ps -p $$ -o comm=` + # if shell is not csh or tcsh exit -if (`basename "$SHELL"` != "csh" && `basename "$SHELL"` != "tcsh") then +if (`basename $shell_name` != "csh" && `basename $shell_name` != "tcsh") then echo "Unsupported shell, please use 'csh' or 'tcsh' when sourcing this script" exit 1 endif @@ -68,7 +71,7 @@ curl https://bootstrap.pypa.io/get-pip.py | $python set pip=pip3 -if ( ! -x `command -v $pip` ) then +if ( ! -x `which $pip` ) then # If not found in PATH, check $HOME/.local/bin if ( -x "$HOME/.local/bin/$pip" ) then echo "$pip found in $HOME/.local/bin"