Skip to content

Commit

Permalink
Merge pull request #5 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 0.4.2
  • Loading branch information
andyone committed Mar 2, 2016
2 parents cf1c8a4 + 7074530 commit 13bd816
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
15 changes: 10 additions & 5 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (

const (
APP = "RBInstall"
VER = "0.4.1"
VER = "0.4.2"
DESC = "Utility for installing prebuilt ruby versions to RBEnv"
)

Expand Down Expand Up @@ -135,7 +135,7 @@ func Init() {
fmtc.NewLine()

for _, err := range errs {
fmtc.Printf("{r}%s{!}\n", err.Error())
fmtc.Printf("{r}%v{!}\n", err)
}

exit(1)
Expand All @@ -160,14 +160,14 @@ func Init() {
config, err = knf.Read(CONFIG_FILE)

if err != nil {
fmtc.Printf("{r}%s{!}\n", err.Error())
fmtc.Printf("{r}%v{!}\n", err)
exit(1)
}

currentUser, err = system.CurrentUser()

if err != nil {
fmtc.Printf("{r}%s{!}\n", err.Error())
fmtc.Printf("{r}%v{!}\n", err)
exit(1)
}

Expand All @@ -177,7 +177,12 @@ func Init() {

fetchIndex()

temp = tmp.NewTemp(config.GetS(MAIN_TMP_DIR, "/tmp"))
temp, err = tmp.NewTemp(config.GetS(MAIN_TMP_DIR, "/tmp"))

if err != nil {
fmtc.Printf("{r}%v{!}\n", err)
exit(1)
}

if len(args) != 0 {
prepare()
Expand Down
9 changes: 6 additions & 3 deletions gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package gen

import (
"os"
"sort"
"strings"
"time"

Expand All @@ -26,7 +27,7 @@ import (

const (
APP = "RBInstall Gen"
VER = "0.4.0"
VER = "0.4.2"
DESC = "Utility for generating RBInstall index"
)

Expand Down Expand Up @@ -192,6 +193,8 @@ func buildIndex(path string) {

fileList := fsutil.List(path+"/"+arch, true)

sort.Strings(fileList)

if len(fileList) == 0 {
fmtc.Printf("\n{y}Can't find files in %s directory. Skipping...{!}\n\n", path+"/"+arch)
continue
Expand Down Expand Up @@ -234,9 +237,9 @@ func buildIndex(path string) {
RailsExpress: fsutil.IsExist(path + "/" + arch + "/" + cleanName + "-railsexpress.7z"),
}

fmtc.Printf("{g}+{!} {*c}%-24s{!} -> {c}%s/%s{c}\n", info.Name, arch, category)
fmtc.Printf("{g}+ %-24s{!} {c}%s/%s{!}\n", info.Name, arch, category)
} else {
fmtc.Printf("{y}+{!} {*c}%-24s{!} -> {c}%s/%s{c}\n", info.Name, arch, category)
fmtc.Printf("{s}+ %-24s%s/%s{!}\n", info.Name, arch, category)
}

newIndex.Data[arch][category].Versions = append(newIndex.Data[arch][category].Versions, info)
Expand Down

0 comments on commit 13bd816

Please sign in to comment.