Commit df6de5be authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

move scripts into the scripts/ folder

parent b279537b
...@@ -8,7 +8,7 @@ all: ...@@ -8,7 +8,7 @@ all:
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)" @echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
@go get -d -v ./... @go get -d -v ./...
@echo "$(OK_COLOR)==> Building$(NO_COLOR)" @echo "$(OK_COLOR)==> Building$(NO_COLOR)"
@./build.sh @./scripts/build.sh
format: format:
go fmt ./... go fmt ./...
......
...@@ -6,6 +6,13 @@ OK_COLOR="\x1b[32;01m" ...@@ -6,6 +6,13 @@ OK_COLOR="\x1b[32;01m"
ERROR_COLOR="\x1b[31;01m" ERROR_COLOR="\x1b[31;01m"
WARN_COLOR="\x1b[33;01m" WARN_COLOR="\x1b[33;01m"
# Get the parent directory of where this script is.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
# Change into that directory
cd $DIR
# Compile the main Packer app # Compile the main Packer app
echo "${OK_COLOR}--> Compiling Packer${NO_COLOR}" echo "${OK_COLOR}--> Compiling Packer${NO_COLOR}"
......
#!/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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment