git.iko.soy/xmrig-bash-scripts
on master help sign in
Merge pull request #3 from seanwhe/develop
43bc54dSean Wheller
build.sh+16−4
@@ -11,12 +11,24 @@ if [ -d "$_XMRIG_CLONE_LOCATION" ]; then
11 # Change to clone directory
11 # Change to clone directory
12 cd $_XMRIG_CLONE
12 cd $_XMRIG_CLONE
13
13
14+ if git branch | grep -q -m1 "* $_XMRIG_BRANCH"; then
14− # Pull changes from source
15+ # Pull changes from source
15− git pull
16+ git pull
16
17
17− # Call function
18+ # Call function
18− build_xmrig
19+ build_xmrig
20+
21+ else
22+ # Switch to required branch
23+ echo "Require: $_XMRIG_BRANCH Switching !!!"
24+ git checkout $_XMRIG_BRANCH
25+
26+ # Pull changes from source
27+ git pull
19
28
29+ # Call function
30+ build_xmrig
31+ fi
20else
32else
21 # Clone the source
33 # Clone the source
22 echo "Cloning source to $_WORK_DIR/$_XMRIG_CLONE"
34 echo "Cloning source to $_WORK_DIR/$_XMRIG_CLONE"