<commit_before>#!/usr/bin/env bash

#####################################################################
# @author <NAME>
# @copyright (C): 2016 ACK CYFRONET AGH
# This software is released under the MIT license
# cited in 'LICENSE.txt'.
#####################################################################
# usage:
# ./inject_gui.sh
#
# This script copies static GUI files included in a static docker image to
# given directory. Can be used to inject the GUI during release building.
#####################################################################

# Configuration
STATIC_FILES_IMAGE='docker.onedata.org/oz-gui-default:VFS-1825'
TARGET_DIR='rel/oz_worker/data/gui_static'

# Fail on any command failure
set -e

echo "Copying static GUI files"
echo "    from image: ${STATIC_FILES_IMAGE}"
echo "    under path: ${TARGET_DIR}"

# Create docker volume based on given image. Path /var/www/html is arbitrarily
# chosen, could be anything really - it must be later referenced in docker cp.
CONTAINER_ID=`docker create -v /var/www/html ${STATIC_FILES_IMAGE} /bin/true`

# Create required dirs
mkdir -p ${TARGET_DIR}

# Remove old files (if any)
rm -rf ${TARGET_DIR}

# Copy the files ( -L = follow symbolic links ) - warning:
#   this works on docker client 1.10+ !
# Use path from docker create volume
docker cp ${CONTAINER_ID}:/var/www/html ${TARGET_DIR}

# Remove unneeded container
docker rm -f ${CONTAINER_ID}<commit_msg>VFS-1825 minor fix in gui injection script<commit_after>#!/usr/bin/env bash

#####################################################################
# @author <NAME>
# @copyright (C): 2016 ACK CYFRONET AGH
# This software is released under the MIT license
# cited in 'LICENSE.txt'.
#####################################################################
# usage:
# ./inject_gui.sh
#
# This script copies static GUI files included in a static docker image to
# given directory. Can be used to inject the GUI during release building.
#####################################################################

# Configuration
STATIC_FILES_IMAGE='docker.onedata.org/op-gui-default:VFS-1825'
TARGET_DIR='rel/op_worker/data/gui_static'

# Fail on any command failure
set -e

echo "Copying static GUI files"
echo "    from image: ${STATIC_FILES_IMAGE}"
echo "    under path: ${TARGET_DIR}"

# Create docker volume based on given image. Path /var/www/html is arbitrarily
# chosen, could be anything really - it must be later referenced in docker cp.
CONTAINER_ID=`docker create -v /var/www/html ${STATIC_FILES_IMAGE} /bin/true`

# Create required dirs
mkdir -p ${TARGET_DIR}

# Remove old files (if any)
rm -rf ${TARGET_DIR}

# Copy the files ( -L = follow symbolic links ) - warning:
#   this works on docker client 1.10+ !
# Use path from docker create volume
docker cp -L ${CONTAINER_ID}:/var/www/html ${TARGET_DIR}

# Remove unneeded container
docker rm -f ${CONTAINER_ID}
{'fraction_non_alphanumeric': 0.23199445983379502, 'fraction_numerical': 0.009002770083102494, 'mean_word_length': 5.069327731092437, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3251225', 'n_tokens_mistral': 892, 'n_tokens_neox': 796, 'n_words': 298}