@@ -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
14+ if git branch | grep -q -m1 "* $_XMRIG_BRANCH"; then
14− # Pull changes from source
15+ # Pull changes from source
17− # Call function
18+ # Call function
18− build_xmrig
19+ build_xmrig
22+ # Switch to required branch
23+ echo "Require: $_XMRIG_BRANCH Switching !!!"
24+ git checkout $_XMRIG_BRANCH
26+ # Pull changes from source
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"