Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtbandes/trash-corresponding-derived-data
A Folder Action which automatically trashes derived data (build products) when you move an Xcode project to the Trash.
https://github.com/jtbandes/trash-corresponding-derived-data
Last synced: 16 days ago
JSON representation
A Folder Action which automatically trashes derived data (build products) when you move an Xcode project to the Trash.
- Host: GitHub
- URL: https://github.com/jtbandes/trash-corresponding-derived-data
- Owner: jtbandes
- Created: 2012-07-29T06:49:04.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-16T22:35:26.000Z (over 11 years ago)
- Last Synced: 2024-10-31T01:23:36.854Z (2 months ago)
- Size: 352 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Trash-Corresponding-Derived-Data
================================A Folder Action which automatically trashes derived data (build products) when you move an Xcode project to the Trash.
If the items you move to the Trash contain any `.xcodeproj` files, then any folders in DerivedData that have the same name will also be moved to the Trash.
### To download:
Click on either the `.zip` file or the `.xip` file (a signed archive for Mountain Lion and up)!## Demo
![demo](http://i.imgur.com/chEig.gif)
## The script
For the paranoid, here is the script used to find the derived data folders (you can also open the folder action in Automator to see how it works):
```sh
DATADIR=~/Library/Developer/Xcode/DerivedData# bail early if there is no DerivedData directory
if [ ! -d "$DATADIR" ]; then exit 0; fi# find any Xcode projects
for PROJ in $(find "$@" -name "*.xcodeproj")
do
# find corresponding build output folders
find "$DATADIR" -maxdepth 1 -type d -name "$(basename "$PROJ" .xcodeproj)-*" -print
done
````