gsd-cli 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli.rb +5 -4
- data/lib/game_template.rb +2 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8757279dc783990858f376000e8450e650643545960316708439c14f74e1ad94
|
4
|
+
data.tar.gz: babdf0c2b2e375f7ce015b035c485bc35aa262a68274c4b5ca493f506abc2417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2369bc6f35e5a98d04c4c59d8f48048a9909b6899593a9d5b59c8c716b19a4a6e6d00f157ee00932279107d2a1325be5ff8617fa608bb0068425ed2e191e74ac
|
7
|
+
data.tar.gz: 8d8f8bf1f2feed07350e4caba7d5b4caaea4faa00924ad90bba69343039e305e6a854d1c271cd075c2b26eb6189b4c0ed403f269c1cc52a915a8d7a39030718d
|
data/lib/cli.rb
CHANGED
@@ -31,7 +31,7 @@ end
|
|
31
31
|
@games = userdata
|
32
32
|
|
33
33
|
program :name, "gsd-cli"
|
34
|
-
program :version, "0.1.
|
34
|
+
program :version, "0.1.24"
|
35
35
|
program :description, "A cli tool to deploy & manage dedicated game servers on Linux"
|
36
36
|
|
37
37
|
command :install do |c|
|
@@ -45,10 +45,11 @@ command :install do |c|
|
|
45
45
|
c.action do |args, options|
|
46
46
|
abort("Install what? Provide a game name argument!") if (args.first().nil?)
|
47
47
|
puts "Beginning installation process. This may take a while..."
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
game = @games[args.first()]
|
49
|
+
GameTemplate.new(game)
|
50
|
+
.install("/opt/#{game.name}", options.steamuser, options.steampassword)
|
51
51
|
puts "Server installation & deployment complete!".green
|
52
|
+
end
|
52
53
|
end
|
53
54
|
|
54
55
|
command :run do |c|
|
data/lib/game_template.rb
CHANGED
@@ -45,19 +45,14 @@ class GameTemplate
|
|
45
45
|
exec(@game.launch(install_path))
|
46
46
|
end
|
47
47
|
|
48
|
-
def install(install_path, steamuser, steampassword
|
48
|
+
def install(install_path, steamuser, steampassword)
|
49
49
|
# ensure_delete_unit_file(install_path) if install_path.nil? == false
|
50
50
|
if @game.app_id.nil?
|
51
51
|
@game.install_server(get_install_path(install_path))
|
52
52
|
else
|
53
53
|
install_steam_server(install_path, steamuser, steampassword)
|
54
54
|
end
|
55
|
-
cli_path =
|
56
|
-
`which gsd-cli`.strip()
|
57
|
-
else
|
58
|
-
puts "Dev mode enabled - running from source"
|
59
|
-
"#{Dir.pwd}/bin/gsd-cli"
|
60
|
-
end
|
55
|
+
cli_path = `which gsd-cli`.strip()
|
61
56
|
create_unit_file(cli_path, install_path)
|
62
57
|
end
|
63
58
|
|