Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Cleanup of startMZmine_Windows.bat #50

Merged
merged 6 commits into from
Jun 4, 2015

Conversation

dyrlund
Copy link
Member

@dyrlund dyrlund commented Jun 3, 2015

Please comment on the changes I have made to the Windows script. Once we are happy with it, I will make the same changes to the linux ans mac scripts and you can then also comment on them.

:: *****************************************

:: Total amount of memory in MB available to MZmine 2.
:: 0 = automatically determined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment says 0 = automatically determined, but below AUTO is used instead of 0.

@dyrlund
Copy link
Member Author

dyrlund commented Jun 3, 2015

I am not 100% sure about this line:
if [ "$HEAP_SIZE" -eq AUTO ]; then

@tomas-pluskal
Copy link
Member

The -eq AUTO is not going to work, because -eq is used to compare integers:

 n1 -eq n2     True if the integers n1 and n2 are algebraically equal.

The = operator might be better:

s1 = s2       True if the strings s1 and s2 are identical.

But you'll need to add parenthesis around AUTO.


:: It is usually not necessary to modify the JAVA_COMMAND parameter, but if you like to run
:: a specific Java Virtual Machine, you may set the path to the java command of that JVM
set JAVA_COMMAND=java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're cleaning up the scripts, maybe we could change this to
JAVA_COMMAND=java.exe
in the Windows script. That will make the meaning more obvious. The comment can be also updated ("..., you may set the path to the java.exe command...").

@dyrlund
Copy link
Member Author

dyrlund commented Jun 4, 2015

I changed the comparison to:
f [ "$HEAP_SIZE" == "AUTO" ]; then

echo "Checking physical memory size..."
TOTAL_MEMORY=`free -b | awk '/Mem:/ { print int($2 / 1024^2) }'`
echo "Found $TOTAL_MEMORY MB memory"

if [ "$TOTAL_MEMORY" -gt 4096 ]; then
if [ "$HEAP_SIZE" == "AUTO" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thomas,
I think it should be a single equal sign (=), not ==.
As I posted in the previous message:

 s1 = s2       True if the strings s1 and s2 are identical.

tomas-pluskal added a commit that referenced this pull request Jun 4, 2015
Cleanup of startMZmine_Windows.bat
@tomas-pluskal tomas-pluskal merged commit 2b9b7ee into mzmine:master Jun 4, 2015
@dyrlund dyrlund deleted the startup_scripts branch June 4, 2015 07:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants