Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Forked from jasonsanjose/README.md
Created July 18, 2013 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dz0ny/6031980 to your computer and use it in GitHub Desktop.
Save dz0ny/6031980 to your computer and use it in GitHub Desktop.

Choose a directory to download both brackets-shell and brackets git respositories. The following script will setup the repositories and download required dependencies.

wget https://gist.github.com/jasonsanjose/5514813/raw/e2e688f0e5151b93a2f2c17c93436bac13d32f35/setup.sh; chmod +x setup.sh; bash setup.sh; rm setup.sh
#!/bin/bash
echo "Brackets Contributor Setup"
echo ""
echo "Contributors should fork the brackets and brackets-shell"
echo "repositories to their own GitHub account. Skip this step"
echo "to use the main repositories."
echo ""
# prompt for GitHub user name
echo -n "(Optional) Enter your GitHub user name and press [ENTER]: "
read username
brackets_shell_adobe_url="https://github.com/adobe/brackets-shell.git"
brackets_adobe_url="https://github.com/adobe/brackets.git"
# default to adobe repositories
if [ -z "$username" ]; then
brackets_shell_url="$brackets_shell_adobe_url"
brackets_url="$brackets_adobe_url"
else
brackets_shell_url="https://github.com/${username}/brackets-shell.git"
brackets_url="https://github.com/${username}/brackets.git"
fi
# test repository URLs
wget -q $brackets_shell_url
if [ $? -ne 0 ]; then
echo "brackets-shell repository not found:" $brackets_shell_url
echo "Fork the repository at https://github.com/adobe/brackets-shell/fork"
exit 1
fi
wget -q $brackets_url
if [ $? -ne 0 ]; then
echo "brackets repository not found:" $brackets_shell_url
echo "Fork the repository at https://github.com/adobe/brackets/fork"
exit 1
fi
# install git
sudo apt-get install --assume-yes git
# clone brackets-shell
git clone $brackets_shell_url
# run setup
pushd brackets-shell
# add upstream
git remote add upstream $brackets_shell_adobe_url
git fetch upstream
# run first time setup
git checkout upstream/master
./scripts/setup_linux_build.sh
make
popd
# clone brackets
git clone $brackets_url
pushd brackets
# add upstream
git remote add upstream $brackets_adobe_url
git fetch upstream
# update submodules
git checkout upstream/master
git submodule update --init --recursive
popd
pushd brackets-shell
# install node and grunt
sudo apt-get install --assume-yes python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js -y
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes nodejs
sudo npm install -g grunt-cli
sudo npm install
# copy files
grunt copy:linux copy:www copy:samples
# package www files
./installer/linux/build_installer.sh
# install debian package
sudo dpkg -i installer/linux/brackets.deb
popd
# symlink git repo to installed brackets
sudo ln -s "${PWD}/brackets" /usr/lib/brackets/dev
echo "Done"
# run brackets
brackets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment