## allow group to modify results by default
umask u=rwx,g=rwx,o=

export PROJECT_NAME=dye_rnaseq
export PROJECT_DIR=bioinformatics/projects/${PROJECT_NAME}

#############################################
# setup project locally on project space
#############################################

mkdir /Volumes/${PROJECT_DIR}

cd /Volumes/${PROJECT_DIR}

## setup data (unison target)
mkdir data

## setup scripts
git init --bare .scripts_git_origin
git clone ssh://fileserver/projects/${PROJECT_DIR}/.scripts_git_origin scripts


## check out the working copy
git clone ssh://fileserver/projects/${PROJECT_DIR}/.scripts_git_origin scripts


#############################################
## setup project on cluster
#############################################

mm

## setup data (to be synced with unison later)
mkdir /projects/bioinfo/holger/projects/${PROJECT_NAME}
cd /projects/bioinfo/holger/projects/${PROJECT_NAME}



## setup scripts
git clone ssh://fileserver/projects/${PROJECT_DIR}/.scripts_git_origin /projects/bioinfo/holger/scripts/${PROJECT_NAME}


## configure which version of common tools to use
cd /projects/bioinfo/holger/scripts/${PROJECT_NAME}

ln -s /projects/bioinfo/scripts/ngs_tools/dev ngs_tools

## prepare gitignore to avoid that we commit it again
echo ngs_tools > .gitignore
git add .gitignore
git commit -m "started project"
git push origin master


## setup project on bioinfo
#bi
#mkdir ~/projects/${PROJECT_NAME}
#cd ~/projects/${PROJECT_NAME}