Skip to content

[MacOs] error in osx/make-installer.sh #84

@SlySven

Description

@SlySven

I have just cloned this repository prior to submitting some changes and I spotted a shell script logic error in PR #82 :

In the following:

 perl -pi -e "s|build/.*Mudlet.*\\.app|build/${app}|i" appdmg/mudlet-appdmg.json
+if [ -z "${ptb}" ]; then
+  perl -pi -e "s|icons/.*\\.icns|icons/mudlet_ptb.icns|i" appdmg/mudlet-appdmg.json
+else
+  if [ -z "${release}" ]; then
+    perl -pi -e "s|icons/.*\\.icns|icons/mudlet_dev.icns|i" appdmg/mudlet-appdmg.json
+  else
+    perl -pi -e "s|icons/.*\\.icns|icons/mudlet.icns|i" appdmg/mudlet-appdmg.json
+  fi
+fi

the test condition in the first if is wrong. the -z argument to test (or it's [ alias) returns true if the following argument is an empty string, the test for a non-empty one is -n. Given that ptb is set to "yep" if it suppose to be a public test build then the outer if will branch to the else case where the absence of the release build option will cause the development build option to be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions