mirror of https://github.com/hashicorp/packer
parent
b279537bc8
commit
df6de5beab
@ -1,12 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get the directory where this script is. This will also resolve
|
# Get the parent directory of where this script is.
|
||||||
# any symlinks in the directory/script, so it will be the fully
|
|
||||||
# resolved path.
|
|
||||||
SOURCE="${BASH_SOURCE[0]}"
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
||||||
|
|
||||||
|
# Change into that dir because we expect that
|
||||||
|
cd $DIR
|
||||||
|
|
||||||
# Determine the version that we're building based on the contents
|
# Determine the version that we're building based on the contents
|
||||||
# of packer/version.go.
|
# of packer/version.go.
|
||||||
Loading…
Reference in new issue