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

# Set debug mode and halt on errors
set -x
set -e

# Full path of your ssh, used by the aliases
SSH_PATH=$(which ssh)

# Function to connect to the ssh server exposed by JBoss Fuse. Uses sshpass to script the password authentication
ssh2fabric() {
    sshpass -p admin $SSH_PATH -p 8101 -o ServerAliveCountMax=100 -o ConnectionAttempts=180 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o LogLevel=ERROR admin@localhost "$@"
}

# wait for ssh server to be up, avoids "Connection reset by peer" errors
while ! ssh2fabric "echo up" ; do sleep 1s; done;

# Wait for critical components to be available before progressing with other steps
ssh2fabric "wait-for-service -t 300000 io.fabric8.api.BootstrapComplete"

# Scaffold fuse
# ssh2fabric "shell:source /home/vagrant/scaffold-fuse-fabric.karaf"

# Set debug mode off
set +x<commit_msg>Trying to get bash script to work with alias<commit_after>#!/usr/bin/env bash

shopt -s expand_aliases

# Set debug mode and halt on errors
set -x
set -e

# Full path of your ssh, used by the aliases
SSH_PATH=$(which ssh)

#ssh2fabric() {
#    sshpass -p admin $SSH_PATH -p 8101 -o ServerAliveCountMax=100 -o ConnectionAttempts=180 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o LogLevel=ERROR admin@localhost "$@"
#}

# Function to connect to the ssh server exposed by JBoss Fuse. Uses sshpass to script the password authentication
alias ssh2fabric="sshpass -p admin $SSH_PATH -p 8101 -o ServerAliveCountMax=100 -o ConnectionAttempts=180 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o LogLevel=ERROR admin@localhost"

# wait for ssh server to be up, avoids "Connection reset by peer" errors
while ! ssh2fabric "echo up" ; do sleep 1s; done;

# Wait for critical components to be available before progressing with other steps
ssh2fabric "wait-for-service -t 300000 io.fabric8.api.BootstrapComplete"

# Scaffold fuse
ssh2fabric "shell:source /home/vagrant/scaffold-fuse-fabric.karaf"

# Set debug mode off
set +x
{'fraction_non_alphanumeric': 0.0832553788587465, 'fraction_numerical': 0.025724976613657625, 'mean_word_length': 4.8125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3938205', 'n_tokens_mistral': 765, 'n_tokens_neox': 674, 'n_words': 252}