]> git.p6c8.net - jirafeau_project.git/blob - lib/locales/add.sh
[FEATURE] Add blog post to Readme
[jirafeau_project.git] / lib / locales / add.sh
1 #!/bin/bash
2 set -e
3 new=$1
4 if [ -z "$new" ]; then
5 echo "please pass the new string id to add as parameter"
6 exit 1
7 fi
8 locales_dir=$(cd "$(dirname $0)" && pwd)
9 new_line=" \"$new\": \"\","
10 find $locales_dir -type f -name "*.json" -print0 | xargs -0 sed -i "s/{/{\n${new_line}/"

patrick-canterino.de