Skip to content

Commit

Permalink
separate unzip bundle bytes method
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaohei committed Jan 24, 2014
1 parent 3ad659d commit d1bc690
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func CheckInstall() bool {
return e == nil
}

func DoInstall() {
func extractBundleBytes(){
// origin from https://github.com/wendal/gor/blob/master/gor/gor.go
decoder := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(zipBytes))
b, _ := ioutil.ReadAll(decoder)
Expand All @@ -36,6 +36,10 @@ func DoInstall() {
decoder = nil
os.Remove(tmpZipFile)
}()
}

func DoInstall() {
extractBundleBytes()
ioutil.WriteFile(installLockFile, []byte(fmt.Sprint(utils.Now())), os.ModePerm)
println("install success")
}
Expand Down

0 comments on commit d1bc690

Please sign in to comment.