Created
June 22, 2015 04:36
-
-
Save jonathanmaron/021fc9a3079a139dced1 to your computer and use it in GitHub Desktop.
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
# strip comments | |
cat package.xml | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' > package.tmp.xml | |
# clean XML file | |
xmllint package.tmp.xml --format --encode utf-8 | unexpand -t2 | expand -t4 > package.clean.xml | |
# replace original file | |
mv package.clean.xml package.xml | |
# clean up | |
rm package.tmp.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment