The 272th line go wrong in SetupMinecraft.sh
huaji233333 opened this issue · 1 comments

Look at the output, the 272th line error, it says the command: "bc" was not found
I use the raspberrypi 3B+ and Raspbian with GUI.
The original code in the script:
#Ask user for amount of memory they want to dedicate to the Minecraft server
echo "Please enter the amount of memory you want to dedicate to the server. A minimum of 700MB is recommended."
echo "You must leave enough left over memory for the operating system to run background processes."
echo "If all memory is exhausted the Minecraft server will either crash or force background processes into the paging file (very slow)MemSelected=0
while [[ $MemSelected -lt 600 || $MemSelected -ge $TotalMemory ]]; do
read -p "Enter amount of memory in megabytes to dedicate to the Minecraft server (recommended: $RecommendedMemory): " MemSelectedMemSelected=$(echo $MemSelected | bc)
if [[ $MemSelected -lt 600 ]]; then
echo "Please enter a minimum of 600"
elif [[ $MemSelected -gt $TotalMemory ]]; then
echo "Please enter an amount less than the total memory in the system ($TotalMemory)"
fi
done
echo "Amount of memory for Minecraft server selected: $MemSelected MB"
Hello,
I have removed the bc dependency from the script to fix this. The new version should now work.