Created
February 20, 2015 22:07
-
-
Save vitovalov/9b8ba23166b5862ed60b to your computer and use it in GitHub Desktop.
This script allows to generate android strings.xml in each defined language creating all needed directories
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
# Made by [email protected] | |
# Overwrites existing files and directories | |
# Creates missing directories | |
node generate strings.json 'android' | |
# no trailing slash | |
PROJECT_DIR=~/project/src/main/res | |
if [ ! -d "$PROJECT_DIR" ]; then | |
echo "Error: Please define PROJECT_DIR" | |
exit 1 | |
# destination trailing slash indicates that input should go inside of $PROJECT_DIR | |
# copies the directory values-es overwriting the existant | |
# copies the files inside of values-es to dest directory | |
cp -vR android/values-es $PROJECT_DIR/ | |
# -p to create intermidiate dirs if not exist and to not warn when dir already exists | |
mkdir -p $PROJECT_DIR/values | |
# copies the contents of the source dir inside the dest directory | |
cp -vR android/values-en/* $PROJECT_DIR/values | |
cp -vR android/values-ru $PROJECT_DIR/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment