<commit_before>#!/bin/bash


# Possibly TODO in future: Figure out where this script we are running is. As this script and the Vagrantfile are in the same location.
# So instead of assuming that it is in ~/devstack-gate-test/ figure out where it really is.
# Maybe the 'packaged' directory should be a child of this directory????

# hints.
#  echo $0
#  dirname /home/mishra/foo

set -x

# These two lines do the same thing
#set -e
set -o errexit

# Does all vagrant tasks, like installing and packaging and all that stuff

# Inside Vagrantfile, when using Virtualbox, need to change config.vm.box to whatever you name your package

time vagrant destroy -f
time vagrant up
rm package.box
time vagrant package
time vagrant box add --force --name devstack-gate package.box
time vagrant destroy -f
mkdir -p ~/devstack-gate-test-packaged
cp ~/devstack-gate-test/Vagrantfile ~/devstack-gate-test-packaged/
cd ~/devstack-gate-test-packaged/
time vagrant destroy -f
time vagrant up
 
<commit_msg>Adding directory changing support<commit_after>#!/bin/bash


# TODO: Figure out where this script we are running is. As this script and the Vagrantfile are in the same location.
# So instead of assuming that it is in ~/devstack-gate-test/ figure out where it really is.
# Maybe the 'packaged' directory should be a child of this directory????

# hints.
#  echo $0
#  dirname /home/mishra/foo

set -x


echo Start1
echo $0
echo
echo Step2
dirname /home/mishra
echo Step3
dirname $0
echo Step4
BASE_DIR=$(dirname /home/mishra)
echo $BASE_DIR
echo Step5
echo cp $BASE_DIR/Vagrantfile.packaged



#exit

# These two lines do the same thing
#set -e
set -o errexit

# Does all vagrant tasks, like installing and packaging and all that stuff

# Inside Vagrantfile, when using Virtualbox, need to change config.vm.box to whatever you name your package
cp $0 $BASE_DIR/devstack-gate-test
time vagrant destroy -f
time vagrant up
rm -f package.box
time vagrant package
time vagrant box add --force --name devstack-gate package.box
time vagrant destroy -f
mkdir -p ~/devstack-gate-test-packaged
cp $BASE_DIR/devstack-gate-test/Vagrantfile.packaged $BASE_DIR/devstack-gate-test-packaged/Vagrantfile
cd ~/devstack-gate-test-packaged/
time vagrant destroy -f
time vagrant up

{'fraction_non_alphanumeric': 0.07914628723877279, 'fraction_numerical': 0.004446420631391729, 'mean_word_length': 3.988913525498891, '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': '2308841', 'n_tokens_mistral': 728, 'n_tokens_neox': 708, 'n_words': 301}