Project

General

Profile

checkinAll.sh

bash script to commit all 5 ots repositories with a message. (Note: May need to edit paths) - Ryan Rivera, 09/03/2015 04:56 PM

 
1
#/bin/bash
2

    
3
if [ "x$1" == "x" ]; then
4
    echo "Use: parameter 1 is the comment for git commit"
5
fi
6

    
7
echo
8
echo "=================="
9

    
10
echo "Git comment $1"
11

    
12

    
13
echo
14
echo "=================="
15

    
16
CURRENT_AWESOME_BASE=$PWD
17
if [ -d "$OTSDAQ_DIR" ]; then
18
    echo "Checking in $OTSDAQ_DIR"
19
    cd $OTSDAQ_DIR
20
    git commit -m "$1" .
21
    git push   
22
    cd $CURRENT_AWESOME_BASE
23
else
24
    echo "Path doesn't exist $OTSDAQ_DIR"
25
fi
26

    
27
echo
28
echo "=================="
29

    
30
if [ -d "$OTSDAQ_UTILITIES_DIR" ]; then
31
    echo "Checking in $OTSDAQ_UTILITIES_DIR"
32
    cd $OTSDAQ_UTILITIES_DIR
33
    git commit -m "$1" .
34
    git push   
35
    cd $CURRENT_AWESOME_BASE
36
else
37
    echo "Path doesn't exist $OTSDAQ_UTILITIES_DIR"
38
fi
39

    
40
echo
41
echo "=================="
42

    
43
if [ -d "$OTSDAQ_DEMO_DIR" ]; then
44
    echo "Checking in $OTSDAQ_DEMO_DIR"
45
    cd $OTSDAQ_DEMO_DIR
46
    git commit -m "$1" .
47
    git push   
48
    cd $CURRENT_AWESOME_BASE
49
else
50
    echo "Path doesn't exist $OTSDAQ_DEMO_DIR"
51
fi
52

    
53
echo
54
echo "=================="
55

    
56
if [ -d "$OTSDAQ_DEMO_DIR/../otsdaq-firmware" ]; then
57
    echo "Checking in $OTSDAQ_DEMO_DIR/../otsdaq-firmware"
58
    cd $OTSDAQ_DEMO_DIR/../otsdaq-firmware
59
    git commit -m "$1" .
60
    git push   
61
    cd $CURRENT_AWESOME_BASE
62
else
63
    echo "Path doesn't exist $OTSDAQ_DEMO_DIR/../otsdaq-firmware"
64
fi
65

    
66
echo
67
echo "=================="
68

    
69
if [ -d "$OTSDAQ_DEMO_DIR/../otsdaq-web" ]; then
70
    echo "Checking in $OTSDAQ_DEMO_DIR/../otsdaq-web"
71
    cd $OTSDAQ_DEMO_DIR/../otsdaq-web
72
    git commit -m "$1" .
73
    git push   
74
    cd $CURRENT_AWESOME_BASE
75
else
76
    echo "Path doesn't exist $OTSDAQ_DEMO_DIR/../otsdaq-web"
77
fi
78

    
79
echo
80
echo "=================="
81
echo "Awesome script done"
82
echo "*******************************"
83
echo "*******************************"