Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strizhechenko/2711014633ab3d3c684d2689b827d3a7 to your computer and use it in GitHub Desktop.
Save strizhechenko/2711014633ab3d3c684d2689b827d3a7 to your computer and use it in GitHub Desktop.
#!/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