Created
February 1, 2014 01:24
-
-
Save tkmtmkt/8746621 to your computer and use it in GitHub Desktop.
javaのパッケージ情報ファイルを作成する
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
<# | |
.SYNOPSIS | |
パッケージ情報ファイルを作成します。 | |
#> | |
ls -dir -r | select -skip 3 | %{ | |
$dir = $_.fullname | |
$packageInfoFile = "$dir\package-info.java" | |
$packageName = (resolve-path $dir -rel).substring(2).replace('\','.') | |
if (test-path $packageInfoFile) { | |
$result = " " | |
} else { | |
$content = @" | |
package $packageName; | |
/** | |
* TODO: パッケージの説明を記入する | |
* @since 1.0 | |
*/ | |
"@ -split "`r*`n" | |
[System.IO.File]::WriteAllLines($packageInfoFile, $content) | |
$result = "new " | |
} | |
write-host "$result $(resolve-path $packageInfoFile -rel)" | |
} | |
# vim: set ts=4 sw=4 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment