diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-11-06 13:16:55 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-11-06 16:16:30 +0000 |
commit | 7d251d694389db8a62c36a9dfa7cf32e2e51bbda (patch) | |
tree | c40c3a49d4b7c8e100d9316426994abbe1881f19 | |
parent | 1a6143c4fe1b969eca90fd7970576c0413c7b4c4 (diff) |
Add script to export files for translation
-rw-r--r-- | _config.yml | 4 | ||||
-rwxr-xr-x | script/translation-export | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/_config.yml b/_config.yml index ad5c74aeb..6ee6be0e1 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,8 @@ baseurl: / permalink: pretty markdown: kramdown url: http://code.alaveteli.org -exclude: [ node_modules ] +exclude: + - node_modules + - script gems: - jekyll-redirect-from diff --git a/script/translation-export b/script/translation-export new file mode 100755 index 000000000..5dba7455e --- /dev/null +++ b/script/translation-export @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +TOP_DIR="$(dirname "$0")/.." +cd "$TOP_DIR" + +REPO="$(basename "$PWD")" +SHA="$(git rev-parse --short HEAD)" +TIMESTAMP=$(date '+%FT%T') +FILENAME="${REPO}_${SHA}_${TIMESTAMP}.tar" + +tar -cvf "$FILENAME" _includes/*.html +tar -uvf "$FILENAME" _layouts/*.html +tar -uvf "$FILENAME" $(ls -1 community/*.md) +tar -uvf "$FILENAME" $(find docs -type f -name "*.md") +tar -uvf "$FILENAME" --exclude README.md $(ls -1 *.md) + +gzip "$FILENAME" |