From fd8e2f7ecc6e6d8a42184ba1f9cce8261d01659a Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Tue, 2 Aug 2016 21:39:29 +0530 Subject: [PATCH 1/7] Created the global steam command --- steam | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 steam diff --git a/steam b/steam new file mode 100644 index 0000000..49dba8a --- /dev/null +++ b/steam @@ -0,0 +1,6 @@ +#!/usr/local/lib/steam/bin/steam +int main() +{ + return 0; +} + From c3b98a5e86a550067d238ee28d4ba6395f3c5735 Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Tue, 2 Aug 2016 21:39:38 +0530 Subject: [PATCH 2/7] Copied steam command to /usr/bin during installation --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index 62dbc4f..1b7810a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,6 +75,7 @@ install: install_steam force $(INSTALL) -m755 tools/export_users $(DESTDIR)/$(STEAMDIR)/tools $(INSTALL) -m755 tools/debug.pike $(DESTDIR)/$(STEAMDIR)/tools $(INSTALL) -m644 tools/applauncher.pike $(DESTDIR)/$(STEAMDIR)/tools + $(INSTALL) -m755 steam /usr/bin $(INSTALL) -m755 sources/steam/steam $(DESTDIR)/$(STEAMDIR)/bin/$(STEAMBRAND) $(INSTALL) -m755 start $(DESTDIR)/$(STEAMDIR) From 1e08fe72a61a92636050048b188091201355a709 Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Wed, 3 Aug 2016 21:04:21 +0530 Subject: [PATCH 3/7] Processing args and implementing shell sub command --- steam | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/steam b/steam index 49dba8a..fd6f683 100644 --- a/steam +++ b/steam @@ -1,6 +1,17 @@ -#!/usr/local/lib/steam/bin/steam -int main() +#!/usr/local/pike/7.8.866/bin/pike + +void resolveParam(int argc,array(string) argv) +{ + if(argv[1]=="shell") + { + mapping response = Process.run("/usr/local/lib/steam/tools/steam-shell.pike"); + } +} + +int main(int argc,array(string) argv) { + if(argc==1)write("No arguments provided\n");//print help + else resolveParam(argc,argv); return 0; } From ba48caf996bcc71e6f58e27ca3ed8ea49779eb95 Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Thu, 4 Aug 2016 23:53:02 +0530 Subject: [PATCH 4/7] Fixed the working of the shell when started as a sub command. --- steam | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/steam b/steam index fd6f683..6eab8ee 100644 --- a/steam +++ b/steam @@ -4,8 +4,10 @@ void resolveParam(int argc,array(string) argv) { if(argv[1]=="shell") { - mapping response = Process.run("/usr/local/lib/steam/tools/steam-shell.pike"); - } + array command =({"/usr/local/lib/steam/tools/steam-shell.pike"}); + object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); + shell->wait(); + } } int main(int argc,array(string) argv) From 8950c4b3770813104bf3cee487fadfa033d1d5b7 Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Fri, 5 Aug 2016 00:18:59 +0530 Subject: [PATCH 5/7] Added the debug sub command --- steam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/steam b/steam index 6eab8ee..bea4d1b 100644 --- a/steam +++ b/steam @@ -7,7 +7,13 @@ void resolveParam(int argc,array(string) argv) array command =({"/usr/local/lib/steam/tools/steam-shell.pike"}); object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); shell->wait(); - } + } + else if (argv[1]=="debug") + { + array command = ({"/usr/local/lib/steam/tools/debug.pike"}); + object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); + shell->wait(); + } } int main(int argc,array(string) argv) From e59426aa083e591e03fd2fc4e1f44d5d51498b3e Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Fri, 5 Aug 2016 22:24:47 +0530 Subject: [PATCH 6/7] Added the edit sub command --- steam | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/steam b/steam index bea4d1b..be5d2c4 100644 --- a/steam +++ b/steam @@ -14,6 +14,12 @@ void resolveParam(int argc,array(string) argv) object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); shell->wait(); } + else if(argv[1]=="edit") + { + array command = ({"/usr/local/lib/steam/tools/edit.pike"})+argv[2..]; + object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); + shell->wait(); + } } int main(int argc,array(string) argv) From 0dba298af5156ddd0e83b086b42f4c93ca1e0973 Mon Sep 17 00:00:00 2001 From: Siddhant085 Date: Mon, 8 Aug 2016 23:55:23 +0530 Subject: [PATCH 7/7] Added sub commands for export and import from git --- steam | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/steam b/steam index be5d2c4..ee98098 100644 --- a/steam +++ b/steam @@ -20,6 +20,22 @@ void resolveParam(int argc,array(string) argv) object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); shell->wait(); } + else if(argv[1]=="import-from-git") + { + array command = ({"/usr/local/lib/steam/tools/import-from-git.pike"})+argv[2..]; + object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); + shell->wait(); + } + else if(argv[1]=="export-from-git") + { + array command = ({"/usr/local/lib/steam/tools/export-to-git.pike"})+argv[2..]; + object shell = Process.create_process(command,(["stdin":Stdio.stdin,"stdout":Stdio.stdout,"stderr":Stdio.stderr])); + shell->wait(); + } + else + { + //print help + } } int main(int argc,array(string) argv)