Skip to content

Commit

Permalink
Made the packager relative to the cwd. Added rm command to remove exi…
Browse files Browse the repository at this point in the history
…sting .box for building a new one.
  • Loading branch information
manarth committed May 18, 2012
1 parent 3f83c46 commit 39464c6
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions package.sh
Expand Up @@ -4,14 +4,25 @@
# Base box.
base="ProjectOscar_1337284846"

# Path to the directory of this script.
cwd="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Path to the .box file.
# TODO: make this relative to this package.sh script.
filepath="~/Development/ProjectOscar/packages"
filepath="$cwd/packages"

# Filename for the .box file
filename="project_oscar.box"

boxfile="$filepath/$filename"

# Remove the old box, if it exists.
if [ -f $boxfile ]
then
echo "Removing old boxfile."
rm $boxfile
fi

echo "Packaging $boxfile."

# Package that box.
vagrant package --base $base --output $boxfile --vagrantfile Vagrantfile --include README.md,puppet/
vagrant package --base $base --output $boxfile --vagrantfile Vagrantfile --include puppet/

0 comments on commit 39464c6

Please sign in to comment.