Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
single-vm: move creation of ciao_bin directory
Browse files Browse the repository at this point in the history
Don't duplicate the mkdir of the ciao_bin directory, and instead
move the call to make the directory to the top of the script.

Signed-off-by: Kristen Carlson Accardi <[email protected]>
  • Loading branch information
kaccardi committed Oct 10, 2016
1 parent 65580fa commit 4f1058a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions testutil/singlevm/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ fedora_cloud_url="https://download.fedoraproject.org/pub/fedora/linux/releases/2
download=0
hosts_file_backup="/etc/hosts.orig.$RANDOM"

#Ensure that the local cache exists
#Create a directory where all the certificates, binaries and other
#dependencies are placed
mkdir -p "$ciao_bin"

if [ ! -d "$ciao_bin" ]
then
echo "FATAL ERROR: Unable to create $ciao_bin"
exit 1
fi

# Copy the cleanup scripts
cp "$ciao_scripts"/cleanup.sh "$ciao_bin"

Expand Down Expand Up @@ -94,16 +101,6 @@ echo "$ciao_ip $ciao_host" > hosts
sudo mv hosts /etc/hosts
sudo rm -rf /var/lib/ciao/instances

#Create a directory where all the certificates, binaries and other
#dependencies are placed
mkdir "$ciao_bin"

if [ ! -d "$ciao_bin" ]
then
echo "FATAL ERROR: Unable to create $ciao_bin"
exit 1
fi

cd "$ciao_bin"

#Cleanup any old artifcats
Expand Down

0 comments on commit 4f1058a

Please sign in to comment.