@@ -77,7 +77,7 @@ if [ -z "$JAVA_HOME" ]; then
7777 # readlink(1) is not available as standard on Solaris 10.
7878 readLink=` which readlink`
7979 if [ ! ` expr " $readLink " : ' \([^ ]*\)' ` = " no" ]; then
80- if $darwin ; then
80+ if [[ " $( uname ) " == " Darwin " ]] ; then
8181 javaHome=" ` dirname \" $javaExecutable \" ` "
8282 javaExecutable=" ` cd \" $javaHome \" && pwd -P` /javac"
8383 else
@@ -151,7 +151,7 @@ getLatestReleaseVersion() {
151151}
152152
153153checkVersion () {
154- github_release_version=$( ` echo getLatestReleaseVersion` )
154+ github_release_version=$( getLatestReleaseVersion)
155155 if [[ -n $github_release_version ]]; then
156156 echo " info: github latest version: $github_release_version "
157157 echo $github_release_version
@@ -162,7 +162,7 @@ checkVersion() {
162162}
163163
164164upgrade () {
165- latest_version=$( ` echo getLatestReleaseVersion` )
165+ latest_version=$( getLatestReleaseVersion)
166166 echo " info: latest version: $latest_version "
167167 if [[ -n $latest_version ]]; then
168168 old_jar=" $PWD /$JAR_NAME "
@@ -204,7 +204,7 @@ mkdirFullNode() {
204204}
205205
206206quickStart () {
207- full_node_version=$( ` echo getLatestReleaseVersion` )
207+ full_node_version=$( getLatestReleaseVersion)
208208 if [[ -n $full_node_version ]]; then
209209 mkdirFullNode
210210 echo " info: check latest version: $full_node_version "
@@ -280,7 +280,7 @@ stopService() {
280280
281281checkAllowMemory () {
282282 os=` uname`
283- totalMemory=$( ` echo getTotalMemory` )
283+ totalMemory=$( getTotalMemory)
284284 total=` expr $totalMemory / 1024`
285285 if [[ $os == ' Darwin' ]]; then
286286 return
@@ -333,7 +333,7 @@ setJVMMemory() {
333333 JVM_MX=$( echo " $SPECIFY_MEMORY /1024*0.6" | bc | awk -F. ' {print $1"g"}' )
334334 JVM_MS=$JVM_MX
335335 else
336- total=$( ` echo getTotalMemory` )
336+ total=$( getTotalMemory)
337337 MAX_DIRECT_MEMORY=$( echo " $total /1024/1024*0.1" | bc | awk -F. ' {print $1"g"}' )
338338 JVM_MX=$( echo " $total /1024/1024*0.6" | bc | awk -F. ' {print $1"g"}' )
339339 JVM_MS=$JVM_MX
@@ -355,8 +355,8 @@ startService() {
355355 exit
356356 fi
357357
358- nohup $JAVACMD -Xms$JVM_MS -Xmx$JVM_MX -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -Xloggc:./gc.log \
359- -XX:+PrintGCDateStamps -XX:+CMSParallelRemarkEnabled -XX: ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing \
358+ nohup $JAVACMD -Xms$JVM_MS -Xmx$JVM_MX -XX:+UseG1GC -XX:+PrintGCDetails -Xloggc:./gc.log \
359+ -XX:+PrintGCDateStamps -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing \
360360 -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
361361 -XX:MaxDirectMemorySize=$MAX_DIRECT_MEMORY -XX:+HeapDumpOnOutOfMemoryError \
362362 -XX:NewRatio=2 -jar \
@@ -383,7 +383,7 @@ rebuildManifest() {
383383 $JAVACMD -jar $ARCHIVE_JAR -d $REBUILD_DIR -m $REBUILD_MANIFEST_SIZE -b $REBUILD_BATCH_SIZE
384384 else
385385 echo ' info: download the rebuild manifest plugin from the github'
386- local latest=$( ` echo getLatestReleaseVersion` )
386+ local latest=$( getLatestReleaseVersion)
387387 download $RELEASE_URL /download/GreatVoyage-v" $latest " /$ARCHIVE_JAR $ARCHIVE_JAR
388388 if [[ $download == 0 ]]; then
389389 echo ' info: download success, rebuild manifest'
@@ -428,7 +428,7 @@ specifyConfig(){
428428
429429checkSign () {
430430 echo ' info: verify signature'
431- local latest_version=$( ` echo getLatestReleaseVersion` )
431+ local latest_version=$( getLatestReleaseVersion)
432432 download $RELEASE_URL /download/$latest_version /sha256sum.txt sha256sum.txt
433433 fullNodeSha256=$( cat sha256sum.txt| grep ' FullNode' | awk -F ' ' ' {print $1}' )
434434
@@ -603,7 +603,7 @@ if [[ $UPGRADE == true ]]; then
603603fi
604604
605605if [[ $DOWNLOAD == true ]]; then
606- latest=$( ` echo getLatestReleaseVersion` )
606+ latest=$( getLatestReleaseVersion)
607607 if [[ -n $latest ]]; then
608608 download $RELEASE_URL /download/$latest /$JAR_NAME $latest
609609 exit
@@ -612,11 +612,7 @@ if [[ $DOWNLOAD == true ]]; then
612612 fi
613613fi
614614
615- if [[ $ALL_OPT_LENGTH -eq 0 || $ALL_OPT_LENGTH -gt 0 ]]; then
616- restart
617- fi
618-
619- if [[ $RUN == true ]]; then
615+ if [[ $ALL_OPT_LENGTH -eq 0 || $RUN == true ]]; then
620616 restart
621617fi
622618
0 commit comments