lib/templates/create/recipes/sunzi.sh in sunzi-1.2.0 vs lib/templates/create/recipes/sunzi.sh in sunzi-1.3.0
- old
+ new
@@ -34,17 +34,14 @@
# When there's "set -e" in install.sh, sunzi.install should be used with if statement,
# otherwise the script may exit unexpectedly when the package is already installed.
#
function sunzi.install() {
- for name in $@
- do
- if sunzi.installed "$name"; then
- echo "$name already installed"
- return 1
- else
- echo "No packages found matching $name. Installing..."
- sunzi.mute "$sunzi_pkg -y install $name"
- return 0
- fi
- done
+ if sunzi.installed "$@"; then
+ echo "$@ already installed"
+ return 1
+ else
+ echo "No packages found matching $@. Installing..."
+ sunzi.mute "$sunzi_pkg -y install $@"
+ return 0
+ fi
}