Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix shell tools for Linux #4810

Merged
merged 6 commits into from
Aug 21, 2013

Conversation

IQAndreas
Copy link
Contributor

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.

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 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\""
Copy link
Member

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

@jasonsanjose
Copy link
Member

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.
@IQAndreas
Copy link
Contributor Author

Good catch, the line has been fixed.

@jasonsanjose
Copy link
Member

Merging.

BTW, it looks like this was your first pull request for Brackets. Thanks for signing to CLA!

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

Successfully merging this pull request may close these issues.

2 participants