brackets/tools/setup_for_hacking.sh

38 строки
970 B
Bash
Исходник Обычный вид История

2012-09-07 03:49:48 +04:00
#!/bin/sh
# Make sure the appname was passed in and is valid
if [[ ${1} == "" ]]; then
2012-09-07 20:19:38 +04:00
echo "Usage: setup_for_hacking.sh <application>"
echo "Setup Brackets to use the HTML/CSS/JS files pulled from GitHub."
echo ""
echo "Parameters: application - full path to the Brackets application"
echo "Example: ./setup_for_hacking.sh \"/Applications/Brackets Sprint 14.app\""
2012-09-07 03:49:48 +04:00
exit;
fi
2012-09-12 01:54:37 +04:00
if [ ! -d "${1}" ]; then
2012-09-07 03:49:48 +04:00
echo "$1 not found."
exit;
fi
# Get the full path of this script
if [[ ${0} == /* ]]; then
full_path="$0"
else
full_path="${PWD}/${0#./}"
fi;
# Remove /tools/setup_for_hacking.sh to get the root directory
root_dir=${full_path%/*/*}
# Remove existing "dev" symlink, if present
if [ -d "${1}/Contents/dev" ]; then
rm "${1}/Contents/dev"
fi
# Make new symlink
ln -s "$root_dir" "${1}/Contents/dev"
echo "Brackets will now use the files in $root_dir"
echo "Run the restore_installed_build.sh script to revert back to the installed source files"