]> gitweb @ CieloNegro.org - build-hc-pkg.git/commitdiff
say_hello: plural form
authorPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 14:14:06 +0000 (23:14 +0900)
committerPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 14:14:06 +0000 (23:14 +0900)
build-hc-pkg

index e0e55f512c25a98bf8c50d4f1277339c5d036d27..07f1cd28b4c4bd9a68c2904c029f6d85fe661225 100755 (executable)
@@ -34,7 +34,12 @@ function say_hello () {
     local -r platform=$(detect_platform_type)
     local -r n_cpus=$(detect_number_of_cpus)
 
-    echo "This is build-hc-pkg, running on $platform with $n_cpus processors."
+    echo -n "This is build-hc-pkg, running on $platform with $n_cpus "
+    if (( $n_cpus == 1 )); then
+        echo "processor."
+    else
+        echo "processors."
+    fi
 }
 
 function srcpath () {