git.iko.soy/xmrig-bash-scripts
on master help sign in
condition check current xmrig src branch
commitf8f9e66a093e65cb1c61a3feba5f3943abd8c871 authorSean Wheller <sean@prepaidmeters.com> dateTue 30 Jul 2019, 22:38 (7 years ago) parent2f832d6
1 file changed+13−4
build.sh+13−4
build.sh+13−4
@@ -11,11 +11,20 @@ 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 -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+ else
21+ # Checkout required branch
22+ git checkout $_XMRIG_BRANCH
23+
24+ # Call function
25+ build_xmrig
26+
27+ fi
1928
2029else
2130 # Clone the source