-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Not possible with every variable (If folder not found there'll be errors)
@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. |
Ok. He wants to merge into builds branch and not into master. |
@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... |
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: |
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. |
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. |
I figure this is okay for tonight. |
I could build it on Ubuntu ;-). You just have to make sure that there's only a Gandalf.app folder. |
@ Everyone @EthanRDoesMC @mehulrao
|
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.