@@ -11,12 +11,24 @@ if [ -d "$_XMRIG_CLONE_LOCATION" ]; then
1111 # Change to clone directory
1212 cd $_XMRIG_CLONE
1313
14− # Pull changes from source
15− git pull
14+ if git branch | grep -q -m1 "* $_XMRIG_BRANCH"; then
15+ # Pull changes from source
16+ git pull
1617
17− # Call function
18− build_xmrig
18+ # Call function
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
1928
29+ # Call function
30+ build_xmrig
31+ fi
2032else
2133 # Clone the source
2234 echo "Cloning source to $_WORK_DIR/$_XMRIG_CLONE"