Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SlySven opened this issue Sep 26, 2020 · 1 comment
Open

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

SlySven opened this issue Sep 26, 2020 · 1 comment
Labels

Comments

@SlySven
Copy link
Member

SlySven commented Sep 26, 2020

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.

@SlySven SlySven added the bug label Sep 26, 2020
@SlySven
Copy link
Member Author

SlySven commented Oct 8, 2020

Well, it might help if there was an M so that I could RTF thing: I've ".. use the source, Luke!" and it now seems this script is invoked in three different ways and the argument options are a little more complex than I at first thought, they are:

  • make-installer.sh "version-string" - should produce a "snap-shot" type build
  • make-installer.sh -pr "version-string" - should produce a "public test build"
  • make-installer.sh -r "version-string" - should produce a "release build"

I will return to this once I have properly thunk it out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant