Skip to content

Instantly share code, notes, and snippets.

@lennartvdd
Created August 17, 2018 13:26
Show Gist options
  • Save lennartvdd/12dc8a591d3f4f0f960220bc32c0935d to your computer and use it in GitHub Desktop.
Save lennartvdd/12dc8a591d3f4f0f960220bc32c0935d to your computer and use it in GitHub Desktop.
POEditor fix escaped characters
#!/bin/bash
#
# Copyright (c) Lennies.IT 2018
#
info() {
echo "--- $1 ---"
}
info "Checkout master"
git checkout master
echo
info "Pull remote origin"
git pull origin
echo
info "Replacing escaped characters in property files: "
for i in $(find ./ -name '*.properties'); do
[ -f "$i" ] || break
echo " - $i"
sed -i 's/\\\([#=:!]\)/\1/g' $i
done
echo "Done. "
echo
info "commit and push to remote origin."
git add . && git commit -m "fix escaped characters" && git push
echo "Finished."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment