Created
June 3, 2010 17:07
-
-
Save xlson/424155 to your computer and use it in GitHub Desktop.
Create placeholders before checking in a new project to git or your versioning system of choice.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
assert args.size() == 1 : "Specify the path of the folder that needs placeholders." | |
def projectFolder = new File(args[0]) | |
projectFolder.eachDirRecurse { dir -> | |
if(dir.list().size() == 0) { | |
def placeholder = new File(dir, '.PLACEHOLDER') | |
println "Creating: $placeholder.absolutePath" | |
placeholder.createNewFile() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment