finnlennartsson / kpum_noddi

repo for processing of DKI/NODDI data for preterm project at KPUM
0 stars 0 forks source link

Setting .bash_aliases on WSL #27

Closed finnlennartsson closed 1 year ago

finnlennartsson commented 1 year ago

Create a file $HOME.bash_aliases in which the bash aliases live

E.g.

#!/bin/bash
# File for setting aliases

alias KPUM_NODDI='
studydir=/mnt/s/Research/Projects/KPUM_NODDI/Data;
conda activate kpum_wsl;
if [ -d $studydir ]; then
        cd $studydir;
else
        echo "Could not find $studydir, instead go to $HOME";
        cd $HOME;
fi'
finnlennartsson commented 1 year ago

Done know.

Information is on the kpum_noddi.wiki and copied in here:

#!/bin/bash

# File for setting aliases on KPUM Workstation

alias KPUM_NODDI='
studydir=/mnt/e/Finn/KPUM_NODDI/Data;
conda activate kpum_wsl;
FSLOUTPUTTYPE=NIFTI
if [ -d $studydir ]; then
        cd $studydir;
else
        echo "Could not find $studydir, instead go to $HOME";
        cd $HOME;
fi'

alias KPUM_NODDI_JYPUTER='
codedir=$HOME/KPUM_NODDI/code/kpum_noddi;
conda activate kpum_wsl;
FSLOUTPUTTYPE=NIFTI
if [ -d $codedir ]; then
        echo "Going to $codedir"
        cd $codedir;
        echo "Updating $codedir with latest code from the github-repo https://github.com/finnlennartsson/kpum_noddi.git
        cd .. #go one level below $codedir
        rm -rf $codedir
        git clone https://github.com/finnlennartsson/kpum_noddi.git
        cd $codedir

        echo "Start Jupyter Notebook"
        jupyter-notebook
else
        echo "Could not find $codedir, instead go to $HOME";
        cd $HOME;
fi'