Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
26 views3 pages

Bashrc Sush

Uploaded by

bhattner1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views3 pages

Bashrc Sush

Uploaded by

bhattner1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

#!

/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 28 12:26:11 2024

@author: sushmarani
"""

####https://towardsdatascience.com/how-to-use-manage-multiple-python-versions-on-
an-apple-silicon-m1-mac-d69ee6ed0250
##### ~/.bashprofile #####
eval "$(pyenv init --path)"

##### ~/.bashrc #####


if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi

##### ~/.zshrc #####


# rosetta terminal setup
if [ $(arch) = "i386" ]; then
alias brew86="/usr/local/bin/brew"
alias pyenv86="arch -x86_64 pyenv"
fi

##### ~/.profile #####


eval "$(pyenv init --path)"

##### ~/.bashrc #####


if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi

if [ "i386" = $(arch) ]; then


export PS1="%bash_rosetta>"
fi

##### ~/.zshrc #####


# rosetta terminal setup
if [ $(arch) = "i386" ]; then
alias brew86="/usr/local/bin/brew"
alias pyenv86="arch -x86_64 pyenv"
fi

# Add Homebrew to PATH


#eval "$(/usr/local/bin/brew shellenv)"

# Qt5 Environment Variables


export PATH="/usr/local/opt/qt@5/bin:$PATH"
#export LDFLAGS="-L/usr/local/opt/qt@5/lib"
#export CPPFLAGS="-I/usr/local/opt/qt@5/include"

#export PATH="/opt/homebrew/Cellar/qt@5/5.15.13_1/lib/cmake/Qt5:$PATH"

echo "Hello Dips! This is your MacBook Pro"


echo "Open nano editor: nano ~/.bashrc"
echo "Sourcing: source ~/.bashrc"
echo "Echoing Path: echo (dollar)PATH | tr ':' '\n'"
echo "runSofa '\n'"
echo "clear variable-->unset SOFA_ROOT \n"
echo "\n\n"

export PATH="/usr/local/opt/[email protected]/bin:$PATH"

export PATH="/usr/local/Cellar/[email protected]/3.10.14_1/bin:$PATH"

##########PATH###########
# Directory to add
new_dir="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/bin/"
# Check if the directory is already in PATH
if [[ ":$PATH:" != *":$new_dir:"* ]]; then
export PATH="$new_dir:$PATH"
fi

# Directory to add
new_dir="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/SofaPython3/"
# Check if the directory is already in PATH
if [[ ":$PATH:" != *":$new_dir:"* ]]; then
export PATH="$new_dir:$PATH"
fi

# Directory to add
new_dir="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/SofaPython3/lib/
python3/site-packages/"
# Check if the directory is already in PATH
if [[ ":$PATH:" != *":$new_dir:"* ]]; then
export PATH="$new_dir:$PATH"
fi

# Directory to add
new_dir="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/STLLIB/lib/
python3/site-packages/"
# Check if the directory is already in PATH
if [[ ":$PATH:" != *":$new_dir:"* ]]; then
export PATH="$new_dir:$PATH"
fi

# Check if /Users/dipankarbhattacharya/Documents/SOFA_v24.06.00_MacOS is already in


the PATH variable
if [[ ":$PATH:" != *":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/:"* ]]; then
export PATH="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS:$PATH"
fi

# Check if /Users/dipankarbhattacharya/Documents/SOFA_v24.06.00_MacOS is already in


the PATH variable
if [[ ":$PATH:" != *":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/bin/:"* ]];
then
export PATH="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/bin/:$PATH"
fi

##############SOFA_ROOT#####################
# Check if SOFA_ROOT is already set and include the directory if not
if [[ -z "$SOFA_ROOT" || ":$SOFA_ROOT:" !=
*":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/:"* ]]; then
export SOFA_ROOT="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/:$SOFA_ROOT"
fi

# Check if SOFA_ROOT is already set and include the directory if not


if [[ -z "$SOFA_ROOT" || ":$SOFA_ROOT:" !=
*":/Users/sushmarani/Documents/sofa/build/:"* ]]; then
export SOFA_ROOT="/Users/sushmarani/Documents/sofa/build/:$SOFA_ROOT"
fi

#####################PYTHONPATH################
# Check if PYTHONPATH is already set and include the directory if not
if [[ -z "$PYTHONPATH" || ":$PYTHONPATH:" !=
*":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/STLIB/lib/python3/site-
packages/:"* ]]; then
export PYTHONPATH="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/
STLIB/lib/python3/site-packages/:$PYTHONPATH"
fi
# Check if PYTHONPATH is already set and include the directory if not
if [[ -z "$PYTHONPATH" || ":$PYTHONPATH:" !=
*":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/SofaPython3/lib/
python3/site-packages/:"* ]]; then
export PYTHONPATH="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/
SofaPython3/lib/python3/site-packages/:$PYTHONPATH"
fi

#####################SOFAPYTHON3_ROOT################
# Check if PYTHONPATH is already set and include the directory if not
if [[ -z "$SOFAPYTHON3_ROOT" || ":$SOFAPYTHON3_ROOT:" !=
*":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/STLIB/lib/python3/site-
packages/:"* ]]; then
export SOFAPYTHON3_ROOT="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/
plugins/STLIB/lib/python3/site-packages/:$SOFAPYTHON3_ROOT"
fi
# Check if PYTHONPATH is already set and include the directory if not
if [[ -z "$SOFAPYTHON3_ROOT" || ":$SOFAPYTHON3_ROOT:" !=
*":/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/plugins/SofaPython3/lib/
python3/site-packages/:"* ]]; then
export SOFAPYTHON3_ROOT="/Users/sushmarani/Documents/SOFA_v24.06.00_MacOS/
plugins/SofaPython3/lib/python3/site-packages/:$SOFAPYTHON3_ROOT"
fi

You might also like