forked from natmourajr/SonarAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
58 lines (51 loc) · 1.81 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# SonarAnalysis Setup Script
#
# Author: [email protected]
#
# Env Variables
if [[ "$USER" == "natmourajr" ]]; then
# natmourajr user
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Ubuntu
export SONAR_WORKSPACE=/home/natmourajr/Workspace/Doutorado/SonarAnalysis
export INPUTDATAPATH=/home/natmourajr/Public/Marinha/Data
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
export SONAR_WORKSPACE=/Users/natmourajr/Workspace/Doutorado/SonarAnalysis_2
export INPUTDATAPATH=/Users/natmourajr/Workspace/Doutorado/Data/SONAR/Classification
# For matplotlib
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
fi
elif [[ "$USER" == "vinicius.mello" ]]; then
# vinicius.mello user
if [ "$OSTYPE" == "linux-gnu" ] || ["$OSTYPE" == "GNU/Linux"]; then
# Ubuntu
export SONAR_WORKSPACE=/home/vinicius.mello/Workspace/SonarAnalysis
export INPUTDATAPATH=/home/vinicius.mello/Public/Marinha/Data
fi
fi
export OUTPUTDATAPATH=$SONAR_WORKSPACE/Results
export PYTHONPATH=$SONAR_WORKSPACE:$PYTHONPATH
export MY_PATH=$SONAR_WORKSPACE
# Folder Configuration
if [ -d "$OUTPUTDATAPATH" ]; then
cd $SONAR_WORKSPACE
#read -e -p "Folder $OUTPUTDATAPATH exist, Do you want to erase it? [Y,n] " yn_erase
#if [ "$yn_erase" = "Y" ]; then
# echo "creating OUTPUTDATAPATH struct"
# rm -rf $OUTPUTDATAPATH
# mkdir $OUTPUTDATAPATH
# cd $SONAR_WORKSPACE/Packages
# for i in $(ls -d */); do mkdir $OUTPUTDATAPATH/${i%%/}; done
#fi
else
echo "OUTPUTDATAPATH: $OUTPUTDATAPATH doesnt exists"
echo "creating OUTPUTDATAPATH struct"
rm -rf $OUTPUTDATAPATH
mkdir $OUTPUTDATAPATH
cd $SONAR_WORKSPACE/Packages
for i in $(ls -d */); do mkdir $OUTPUTDATAPATH/${i%%/}; done
fi
cd $MY_PATH