blob: 72d29eeb17bbbb8da8253d9b31ad9d84540ac2dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package steam
import (
// "fmt"
"git.riedstra.us/mitch/steam-export/archive"
"os"
// "strings"
)
func (l *Library) PackageGame(g string) error {
working_dir, err := os.Getwd()
if err != nil {
return err
}
output := working_dir + "/" + g + ".tar"
os.Chdir(l.Folder)
acf, err := l.FindACF(g)
if err != nil {
return err
}
// acf = strings.Replace(acf, l.Folder, "", -1)
input := []string{"common/" + g, acf}
// fmt.Fprintf(os.Stderr, "input arguments for archive: %s\n", input)
a := archive.Archive{Output: output, Input: input}
err = a.Tar()
if err != nil {
return err
}
os.Chdir(working_dir)
return nil
}
|