Skip to content

Instantly share code, notes, and snippets.

@mattmcmanus
Created July 5, 2013 13:03
Show Gist options
  • Save mattmcmanus/5934399 to your computer and use it in GitHub Desktop.
Save mattmcmanus/5934399 to your computer and use it in GitHub Desktop.
Loops through your projects|www|src directory and automatically create Sublime Text project files
#!/bin/sh
projectsFolder="/Users/matt/Dropbox/Apps/subl-projects"
cwd=`pwd`
for project in *; do
file="$projectsFolder/$project.sublime-project"
[ -d $project ] && [ ! -f $file ] && (
echo "Creating project file for $project"
cat << EOF > $file
{
"folders":
[
{
"follow_symlinks": true,
"path": "$cwd/$project"
}
]
}
EOF
)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment