Sha256: bacac0e5a9ef3540ed01417487339d52c11a8cc27f1e8a3e66f1c7f864f03e07

Contents?: true

Size: 657 Bytes

Versions: 25

Compression:

Stored size: 657 Bytes

Contents

#!/usr/bin/env bash

set -o pipefail
set -o allexport

__ROOT_DIRECTORY__=$(dirname $(readlink -f ${BASH_SOURCE[0]}))

function save_env {
    # Save environment
    <% if Kameleon.env.debug %>set +x<% end %>
    (comm -3 <(declare | sort) <(declare -f | sort)) > "${__ROOT_DIRECTORY__}/<%= File.basename(@bash_env_file) %>"
}

trap 'save_env' INT TERM EXIT

# Load environment
source "${__ROOT_DIRECTORY__}/<%= File.basename(@bash_env_file) %>" 2> /dev/null || true

# Log cmd
echo <%= Shellwords.escape(cmd.value) %> >> "${__ROOT_DIRECTORY__}/<%= File.basename(@bash_history_file) %>"

<% if Kameleon.env.debug %>set -o xtrace <% end %>

<%= cmd.value %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
kameleon-builder-2.10.11 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.10 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.9 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.8 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.7 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.6 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.5 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.4 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.3 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.2 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.10.1 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.9.4 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.9.2 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.9.1 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.9.0 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.8.3 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.8.2 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.8.1 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.7.8 contrib/kameleon_exec_cmd.sh
kameleon-builder-2.7.7 contrib/kameleon_exec_cmd.sh