Created
July 8, 2016 10:45
-
-
Save strizhechenko/2711014633ab3d3c684d2689b827d3a7 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
parse_dump_xml() { | |
SED=sed | |
if [ -x /usr/local/bin/gsed ]; then | |
SED=/usr/local/bin/gsed | |
fi | |
LANG= $SED -e 's/></>\n</g' "${1:-$DUMPXML}" | iconv -f cp1251 | |
} | |
init() { | |
rm -rf git | |
mkdir -p git | |
( cd git; git init ) | |
} | |
make_git() { | |
for i in "${1:-.}"/*.tar.gz; do | |
tar xfz $i usr/local/Reductor/reductor_container/gost-ssl/php/dump.xml | |
parse_dump_xml usr/local/Reductor/reductor_container/gost-ssl/php/dump.xml > git/dump.xml | |
( cd git; git add .; git commit -m "$i" ) | |
done | |
} | |
main() { | |
init | |
make_git "$@" | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment