diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2017-01-03 18:14:32 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2017-01-03 18:14:32 -0500 |
| commit | c5d68db9fb5f831106ce3eb12048e8f9005e531b (patch) | |
| tree | efb7f9298b53349e218792cb4379350c1bf0511f | |
| parent | 8c2ed23f2e25265c6a74870eb4f6b5ad0e82f475 (diff) | |
| download | steam-export-c5d68db9fb5f831106ce3eb12048e8f9005e531b.tar.gz steam-export-c5d68db9fb5f831106ce3eb12048e8f9005e531b.tar.xz | |
Added a build script with other minimal changes
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | Build.sh | 22 | ||||
| -rw-r--r-- | main.go | 20 | ||||
| -rw-r--r-- | steam/steam.go | 4 |
4 files changed, 36 insertions, 11 deletions
@@ -1 +1,2 @@ config.yml +bin diff --git a/Build.sh b/Build.sh new file mode 100755 index 0000000..14c3a03 --- /dev/null +++ b/Build.sh @@ -0,0 +1,22 @@ +#!/bin/sh + + +if ! [ -d bin ] ; then + mkdir bin +fi + +go build -o bin/steam-export . + +GOOS=windows +GOARCH="386" +go build -o bin/steam-export-$GOOS-$GOARCH . + +GOOS=windows +GOARCH=amd64 +go build -o bin/steam-export-$GOOS-$GOARCH.exe . + +GOOS=linux +GOARCH=amd64 +go build -o bin/steam-export-$GOOS-$GOARCH.exe . + +cp bin/steam-export-windows-amd64.exe /Fishtank/Mitch/SteamDrive/SteamGames/ @@ -18,17 +18,19 @@ func main() { if err != nil { fmt.Println(err) } else { - // fmt.Println(libs) + fmt.Println(libs) } - fmt.Println(libs[0].Games[20]) + // fmt.Println(libs[0].Games[20]) - str, err := libs[0].FindACF(libs[0].Games[20]) - // str, err := libs[0].FindACF("/.") - if err != nil { - fmt.Println(err) - } else { - fmt.Println(str) - } + /* + str, err := libs[0].FindACF(libs[0].Games[20]) + // str, err := libs[0].FindACF("/.") + if err != nil { + fmt.Println(err) + } else { + fmt.Println(str) + } + */ } diff --git a/steam/steam.go b/steam/steam.go index 02ecd7e..1f764f2 100644 --- a/steam/steam.go +++ b/steam/steam.go @@ -90,9 +90,9 @@ func (l *Library) FindACF(g string) (string, error) { // This is automatically called to print out the contents of the struct // when things like fmt.Println are used func (s *Library) String() (str string) { - str = fmt.Sprintln("----") + str = fmt.Sprintln("\n----") str = str + fmt.Sprintln(s.Folder) - str = str + "----\n" + str = str + "\n----\n" for k, v := range s.Games { str = str + fmt.Sprintf("%d: %s\n", k, v) //str = str + fmt.Sprintln(v) |
