Browse Source

new: [docker-builder] remove all language except a few listed in environment variable.

postgres
Valentin Lab 10 years ago
parent
commit
1bdb40490a
  1. 9
      precise/docker-builder/src/usr/local/bin/docker-update

9
precise/docker-builder/src/usr/local/bin/docker-update

@ -7,6 +7,7 @@
DOCKER_UPDATE_PATH=${DOCKER_UPDATE_PATH:-/srv/docker-builder}
KEEP_ONLY_PO="fr en de"
include common
@ -79,6 +80,14 @@ cd "$tmpdir_changes"
echo "Cleaning the change layer."
find . -name .git -type d -exec rm -rf {} \; -prune
if [ "$KEEP_ONLY_PO" ]; then
find_args=""
for lang in $KEEP_ONLY_PO; do
find_args="$find_args -not -name $lang.po"
done
find /opt/apps -name \*.po -type f $find_args -delete
fi
## XXXvlab: if we produced it we shouldn't have to pull it

Loading…
Cancel
Save