This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix shell tools for Linux #4810
Merged
jasonsanjose
merged 6 commits into
adobe:master
from
IQAndreas:fix-shell-tools-for-linux
Aug 21, 2013
Merged
Fix shell tools for Linux #4810
jasonsanjose
merged 6 commits into
adobe:master
from
IQAndreas:fix-shell-tools-for-linux
Aug 21, 2013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The scripts need to be bash in order to use, for example, the following line: `if [[ ${1} == "" ]]; then` Simple one-line changes in all three files.
This step is purely aesthetical (for now), and easier on non-OSX developers who may see the '*.app' in the path as a file extension, rather than viewing the target as a directory. If needed, this can be expanded to add more operating systems in the future.
Linux and OSX users will want the symlink to be in two different locations, now the script will adjust accordingly.
Proper exit codes are good practice. Also, if a command fails somewhere in the middle of the script, it will not proceed to the end of the script, outputting a message like "has been restored to the installed configuration."
It doesn't need to be that complicated, but may run into issues if they have manually created folders or files named `dev`, rather than automatically creating it as a link with `setup_for_hacking.sh`. The exsting code was causing problems in Ubuntu anyway.
ghost
assigned jasonsanjose
Aug 19, 2013
@@ -6,16 +22,18 @@ if [[ ${1} == "" ]]; then | |||
echo "Restore Brackets to use the installed HTML/CSS/JS files." | |||
echo "" | |||
echo "Parameters: application - full path to the Brackets application" | |||
echo "Example: ./restore_installed_build.sh \"/Applications/Brackets Sprint 14.app\"" | |||
exit; | |||
echo "Example: ./setup_for_hacking.sh \"$default_app_directory\"" |
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.
Change setup_for_hacking
to restore_installed_build
Tested on Mac. Looks good. Just one minor comment. Thanks @IQAndreas! |
By copy-pasting lines of code has come back to bite me! Good thing I have an eye watching over me.
Good catch, the line has been fixed. |
Merging. BTW, it looks like this was your first pull request for Brackets. Thanks for signing to CLA! |
jasonsanjose
added a commit
that referenced
this pull request
Aug 21, 2013
Fix shell tools for Linux
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The shell scripts in the repo currently do not work at all for Linux systems. These changes allow the scripts to be run on Linux based systems, while still detecting whether the user is running OSX, and adjusts accordingly. The commits also include some general cleanup and fixing of existing code.
I split up the changes into several smaller commits, which both makes it clearer what each change does, and allows me to if needed "remove" any changes which are deemed "unrelated" to this pull request.
Tested and confirmed working on Ubuntu, but not any other Linux-based operating systems. As I don't have a MAC, I am unable to test if the shell scripts still work for OSX systems.