Skip to content

Commit

Permalink
Merge pull request #1 from gliderlabs/master
Browse files Browse the repository at this point in the history
fixing profile load bug
  • Loading branch information
progrium committed Feb 4, 2015
2 parents f4f8900 + f18f196 commit 0a0ef2c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
NAME=glidergun
BINARYNAME=gun
ARCH=$(shell uname -m)
VERSION=0.0.1
VERSION=0.0.2

build:
go-bindata include
mkdir -p build/linux && GOOS=linux go build -ldflags "-X main.Version $(VERSION)" -o build/linux/$(BINARYNAME)
mkdir -p build/darwin && GOOS=darwin go build -ldflags "-X main.Version $(VERSION)" -o build/darwin/$(BINARYNAME)
mkdir -p build/Linux && GOOS=linux go build -ldflags "-X main.Version $(VERSION)" -o build/Linux/$(BINARYNAME)
mkdir -p build/Darwin && GOOS=darwin go build -ldflags "-X main.Version $(VERSION)" -o build/Darwin/$(BINARYNAME)

install: build
install build/$(shell uname -s)/gun /usr/local/bin

deps:
go get -u github.com/jteeuwen/go-bindata/...
Expand All @@ -15,8 +18,8 @@ deps:

release: build
rm -rf release && mkdir release
tar -zcf release/$(NAME)_$(VERSION)_Linux_$(ARCH).tgz -C build/linux $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_Darwin_$(ARCH).tgz -C build/darwin $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_Linux_$(ARCH).tgz -C build/Linux $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_Darwin_$(ARCH).tgz -C build/Darwin $(BINARYNAME)
gh-release create gliderlabs/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD)

.PHONY: build
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# glidergun

## Install

$ curl -sL https://github.com/gliderlabs/glidergun/releases/download/v0.0.1/glidergun_0.0.1_$(uname -s)_$(uname -m).tgz | tar -zxv -C /usr/local/bin
4 changes: 2 additions & 2 deletions bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func include_fn_bash() (*asset, error) {
return a, nil
}

var _include_gun_bash = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\x53\xdf\x6b\xdb\x30\x10\x7e\xb6\xfe\x8a\xab\xf0\xda\xad\xa0\x85\xbd\x6e\x34\xac\x2c\xe9\x08\x64\x4d\xf1\x92\xed\xa1\x74\xc1\x58\xb2\x2d\xa6\x48\xc6\x3f\xd2\x42\xc8\xff\xbe\x93\x2c\xc7\x76\x96\x87\x20\xe7\xbe\xfb\xee\xee\xbb\x1f\x84\x8b\x44\xc5\xa5\x80\xef\x9b\xc7\xed\x8f\xd5\x6c\xb3\x9c\x6f\x67\x8b\xe8\x8e\x86\x87\xb1\xe5\x33\x4b\x76\xbc\x3a\xd2\x11\x21\x5a\xad\xd6\x84\x64\x8d\x66\x52\xcb\xfa\xfd\x07\x38\x90\x60\xf7\x97\xcb\x12\x3e\xa2\x91\x04\x32\x85\xe7\x67\x60\x29\xfe\x95\xb5\xcc\xb4\x41\xde\xcb\xcb\x17\xa8\x73\x81\xa8\x85\xaf\x20\x2b\x45\x01\x37\x7f\x2c\x21\xbc\x19\x3a\x4e\x61\xc2\xc5\x7e\xa2\x1b\xa5\x4e\x8c\x40\x24\xb9\x01\x6a\x9d\x29\x4c\xa7\x03\x77\x04\x53\x49\xec\xef\xd8\x56\xb4\x17\x65\x25\x8d\x6e\x8b\x6a\x69\x99\x92\x5c\x94\x08\x42\x68\xab\xff\x35\x8f\x7e\x2e\x56\x8f\xb4\x63\xa4\x52\x73\x56\x1a\xe3\x85\x28\x93\xc4\x0a\x8a\xb8\xce\xb1\x1b\x4f\xbf\x67\x94\x00\x04\xaf\xb9\x54\xc2\x8a\xa2\xa1\x45\x28\x5c\xdd\x01\xa5\x70\x7d\x8d\x4a\x18\xf7\xd6\x49\x5b\x9f\x55\xca\x0d\xb2\x90\xe7\xc3\x1c\xec\xfb\x6e\x72\x7b\x74\xc1\xb8\xd1\xc2\xbe\xbe\x4d\x17\xe8\x4e\x36\x7a\x04\x5d\xb7\xef\x7c\x5e\x67\x4c\x2c\xa3\x43\x9c\xa9\x97\xaf\x4c\xcc\x59\x51\x9a\x14\xeb\x6d\xf5\x9c\x86\xe1\xda\xb7\x0d\x3f\xd1\xe1\x2c\x2a\xd3\x94\x89\xe8\x31\x6b\xca\x65\x5a\x63\xef\x54\x25\xda\x61\x39\xd9\x36\xdf\x6c\xfe\x70\xbf\x59\xae\xb7\x4f\xd1\xea\x61\xb1\x9c\x3b\xfd\x7d\xe0\x8b\x1e\x83\x54\x67\xb9\x2e\xb9\xf7\xa3\xbe\x85\x4d\x25\x75\x06\x5c\xa4\x71\xa3\x6a\xf0\x92\xe0\x72\x96\xd1\x16\xec\x62\xe9\xc7\x5f\x89\x1a\x98\x30\x50\xc8\x02\xc3\x48\xdc\x27\x27\x65\x1d\xdd\x7f\x73\xa5\xd9\xfa\x9d\xcf\x1b\x09\x46\x9b\x10\x90\x80\x8c\x94\xbb\x4e\x0f\xc5\x70\x51\x54\x6e\xfb\xf1\xfb\xbc\xef\xa7\xae\xb1\x6e\x50\xfd\x3d\x8d\x3b\xb2\x33\xbc\x51\xa2\x25\xdb\xf3\xf9\xcf\xbb\x17\x46\x02\x3c\x44\x26\xde\x0a\x53\xd6\xd0\x9d\x1e\xb4\x15\x9c\x21\xfe\x04\xc0\xbf\x23\x5c\xe8\x3d\xab\x72\xf3\x6a\x3f\x46\x40\xaa\x19\xee\xbd\xc2\xd7\xa7\xd2\x95\xdd\x70\x1a\x7e\xc5\x43\xf9\x17\x00\x00\xff\xff\x87\x56\xdd\x45\x2f\x04\x00\x00")
var _include_gun_bash = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\x53\x51\x6f\xda\x30\x10\x7e\x8e\x7f\xc5\xd5\xca\xda\xad\x52\x86\xfa\xba\xa9\xd5\xaa\x41\x27\x24\x56\x2a\x06\xdb\x43\xd5\xa1\x28\xbe\x10\x6b\xc6\x8e\x9c\x84\x56\x42\xfc\xf7\x9d\x1d\x67\x24\x8c\x07\x64\x72\xdf\x7d\xf6\x7d\xdf\xdd\x31\x81\x99\x4a\x2d\xc2\xb7\xd5\xe3\xfa\xfb\x7c\xbc\x9a\x4d\xd6\xe3\xe9\xe2\x96\xc7\xfb\x61\xe4\x53\x92\x6d\x45\x75\xe0\x03\xc2\x62\x3e\x5f\x32\xb6\x69\x74\x22\xb5\xac\xdf\x7f\x80\x3d\x8b\xb6\x7f\x84\xb4\xf0\x91\x82\x2c\x92\x39\x3c\x3f\x43\x92\xd3\xa7\xac\xe5\x46\x1b\xe2\xbd\xbc\x7c\x86\xba\x40\x42\x1d\x7c\x01\x1b\x8b\x25\x5c\xfd\x76\x84\xf8\xaa\x9f\x78\x07\x23\x81\xbb\x91\x6e\x94\xfa\xc7\x88\x30\x2b\x0c\x70\x97\xcc\xe1\xee\xae\x97\x4e\x60\x2e\x99\xfb\x1d\xda\x8a\x76\x68\x2b\x69\x74\x5b\x54\x4b\xdb\x28\x29\xd0\x12\x08\xb1\xab\xfe\xe7\x64\xf1\x63\x3a\x7f\xe4\x1d\x23\x97\x5a\x24\xd6\x98\x20\x44\x99\x2c\x55\x50\xa6\x75\x41\x6e\x3c\xfd\x1a\x73\x06\x10\xbd\x16\x52\xa1\x13\xc5\x63\x87\x70\xb8\xb8\x05\xce\xe1\xf2\x92\x94\x24\x22\x44\x47\x6d\x7d\x4e\xa9\x30\xc4\x22\x5e\xb8\x66\xef\xce\x77\xa3\xeb\x83\xbf\x4c\x18\x8d\xee\x0c\x36\x9d\xa1\x7b\xd9\x94\x11\x75\x6e\xdf\x86\x77\x7d\x30\x73\x8c\x0e\xf1\xa1\xa3\x7c\x65\x52\x91\x94\xd6\xe4\x54\x6f\xab\xa7\x6b\x5c\x08\xd2\x4d\x37\xbc\xd7\x22\x6f\xea\x3a\x0e\x28\xef\xf7\xa9\x32\x8d\xcd\xf0\x34\x83\x00\x8b\x75\x63\x29\x03\x55\x85\x6d\x3f\xbd\x33\xae\xa4\xf1\xe4\xe1\x7e\x35\x5b\xae\x9f\x16\xf3\x87\xe9\x6c\xe2\x2d\x3a\xbe\x72\x36\xa3\xf7\xe2\xc9\x93\xe7\xd2\x8f\xd3\x70\x0d\xab\x4a\xea\x0d\x08\xcc\xd3\x46\xd5\x9d\x40\x38\xff\x8a\xe3\x75\x75\x77\x23\x13\x02\x70\xe3\xdc\xdb\xa6\x32\x4c\x4d\x85\x35\x24\x68\xa0\x94\x25\x5d\x2d\x69\x0c\xbd\xbc\xe5\xe2\xfe\xab\x2f\xd7\x69\xf2\x39\x6f\x2c\x1a\x0c\x50\xc4\x22\x36\x70\xc3\x37\xa8\x2f\x50\x60\x59\xf9\xa5\x69\x6d\x3b\xed\x18\xb8\xe6\xf4\xdc\x28\x64\x5e\x87\x72\xfb\xd3\x32\x5c\xd1\xa1\x83\x5b\x23\x1a\x85\xed\xad\x6e\x23\xff\xcb\x3e\xca\x67\x11\xed\x76\x82\x6f\xa5\xb1\x35\x74\xdb\x0c\x6d\x75\x27\x48\xd8\x2a\x08\xe7\x00\x47\xbd\x4b\xaa\xc2\xbc\xba\x3f\x03\x20\xd7\x09\xad\x92\xa2\x33\x3c\xa5\x2b\xb7\x34\x3c\xfe\x42\xbb\xf7\x37\x00\x00\xff\xff\xc6\xe1\x6f\x47\x82\x04\x00\x00")

func include_gun_bash_bytes() ([]byte, error) {
return bindata_read(
Expand All @@ -156,7 +156,7 @@ func include_gun_bash() (*asset, error) {
return nil, err
}

info := bindata_file_info{name: "include/gun.bash", size: 1071, mode: os.FileMode(420), modTime: time.Unix(1423069763, 0)}
info := bindata_file_info{name: "include/gun.bash", size: 1154, mode: os.FileMode(420), modTime: time.Unix(1423071991, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down
13 changes: 9 additions & 4 deletions include/gun.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ gun-find-root() {
}

gun-load-profile() {
if [[ -f ".gun_$1" ]]; then
source ".gun_$1"
shift
declare profile="$1"
if [[ -f ".gun_$profile" ]]; then
source ".gun_$profile"
return
else
if [[ "$GUN_DEFAULT_PROFILE" && -f ".gun_$GUN_DEFAULT_PROFILE" ]]; then
source ".gun_$GUN_DEFAULT_PROFILE"
echo "* Using default profile $GUN_DEFAULT_PROFILE"
return
fi
fi
return 1
}

main() {
Expand All @@ -44,7 +47,9 @@ main() {

if [[ "$GUN_ROOT" ]]; then
deps-init
gun-load-profile
if gun-load-profile "$1"; then
shift
fi
if [[ -d "$GUN_MODULE_DIR" ]]; then
module-load-dir "$GUN_MODULE_DIR"
fi
Expand Down

0 comments on commit 0a0ef2c

Please sign in to comment.