Created
May 10, 2018 00:59
-
-
Save myok12/4623f2a22eed3626c15b5a89d9a2f7da to your computer and use it in GitHub Desktop.
Add package_info.java files to project
This file contains hidden or 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
find . -name '*.java' | grep -v "\/target\/" | grep java | rev | cut -f "2-" -d "/" | rev | sort | uniq | xargs -I{} sh -c 'echo "$1" | grep -o "java\/.*" | cut -f "2-" -d "/" | tr "/" "." | awk '"'"'{print "package "$1";"}'"'"' > "$1/package-info.java" ' -- {} | |
git status | grep package-info | xargs -I{} sh -c 'echo "@javax.annotation.ParametersAreNonnullByDefault" | cat - "$1" > /tmp/tttt ; mv /tmp/tttt "$1"' -- {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment