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

Build.sh improvement #50

Merged
merged 26 commits into from
May 21, 2017
Merged

Build.sh improvement #50

merged 26 commits into from
May 21, 2017

Conversation

ann0see
Copy link
Collaborator

@ann0see ann0see commented May 18, 2017

Now you just have to execute ./build.sh versionfolder to create a new .deb. Basically just an improvement.
Tried fixing .DS_Store issues (delete all .DS_Store files in Gandalf folder in build.sh) but I need some confirmation by @mehulrao.

Several small improvements. Not only @1Conan 's improvements.
Will check if folder exists and files are present. You can argue about this, but it's just better to do so in my opinion.

Copy link
Collaborator

@1Conan 1Conan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style guide issues

Constants and most variables should be at top.
bash arg variables should be $1 not ${1}
the find command isn't an improvement. Actually made it a little worse. -exec rm {} is more portable.

Gandalf/build.sh Outdated

echo "If you have anything else you need to put into Gandalf, now's the time. You have 15 seconds from the moment this message appears."
sleep 15
find . -name '.DS_Store' -type f -delete
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing different with my find. You just changed -exec rm {}. -exec rm {} is actually much more recommended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Then I'll use your find.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question you use find . -type f -name '.DS_STORE' -exec rm {} +
What's the + for?

Gandalf/build.sh Outdated
RED=$(tput setaf 1)

# Check if started without parameters
if [ "${1}" = "" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://google.github.io/styleguide/shell.xml

${1} should be $1.

Also, I believe you're declaring a variable.

@ann0see
Copy link
Collaborator Author

ann0see commented May 18, 2017

@1Conan ok. So I fixed many things. But I can't put all the constants / variables to the top: Otherwise there'll be some cat errors if I specify a nonexistent / invalid folder (surely cat can't find file or folder -> error). If it aborts before defining e.g. PKG_CONFLICTS there won't be these errors. It's just cosmetic… but if you have a better idea you can improve the branch.
Since I'm very new to all this: Why is e.g. Bold a variable? It is a constant for me (you will not change this e.g. why should I write something else in bold). And PKG_CONFLICTS would be a variable (not sure) Since in every new version this will contain an other value. But we don't change it in the script: so it could be a constant too? M

@ann0see ann0see mentioned this pull request May 19, 2017
@ann0see ann0see closed this May 19, 2017
@ann0see
Copy link
Collaborator Author

ann0see commented May 19, 2017

Ok. He wants to merge into builds branch and not into master.

@ann0see ann0see reopened this May 19, 2017
@ann0see
Copy link
Collaborator Author

ann0see commented May 20, 2017

@mehulrao: There´s something wrong with your App: If you compile Gandalf (102/x) via eg. Ubuntu there´ll be errors: there are then 2 Folders. One called Gandalf.app with capital G, and an other called gandalf.app with a lowercase g. So Ubuntu copies the Gandalf.app and if you install it on iOS the app won´t show. I´ll compile your app via my mac, and we´ll see what´s happening...

@ann0see
Copy link
Collaborator Author

ann0see commented May 20, 2017

Didn't compile your app. Just extracted it from a the latest official .deb.

There were some errors. Hopefully I squashed them now. One error I think we must discuss is this one:
Dpkg wants to remove /var/mobile/Downloads

@EthanRDoesMC
Copy link
Owner

That's a dpkg thing that dpkg does. If downloads were empty, it'd try to remove /mobile. Which it can't. Because there are things in it.

@EthanRDoesMC
Copy link
Owner

To build Gandalf, you need macOS or an OS that recognizes the .app extension in the same way. But since macOS is not preloaded with the stuff required to make it, there will need to be YET ANOTHER FREAKING SCRIPT (lol) to install the stuff on macOS.

@EthanRDoesMC
Copy link
Owner

I figure this is okay for tonight.

@EthanRDoesMC EthanRDoesMC merged commit 98b0d7e into master May 21, 2017
@ann0see
Copy link
Collaborator Author

ann0see commented May 21, 2017

I could build it on Ubuntu ;-). You just have to make sure that there's only a Gandalf.app folder.

@ann0see ann0see deleted the buildsh branch May 21, 2017 07:39
@ann0see
Copy link
Collaborator Author

ann0see commented May 22, 2017

@ Everyone @EthanRDoesMC @mehulrao
Reminder:
Attention: syntax has changed: now you must cd to the folder where build.sh is and execute it with ./build.sh version:

./build.sh x will build GandalfX, ./build.sh 102 will build Gandalf102.
If you have more versions this will speed up compiling (you don't have to edit a file each time) you only run ./build.sh x && ./build.sh 102 && ./build.sh 103 && ./build.sh 933
And after some time you'll get everything compiled.
One thing to add: do we need the confirmation at the beginning?

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

Successfully merging this pull request may close these issues.

4 participants