From 66156350138d2dd32ae52d6fc07c299ccd6c32b7 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 7 May 2019 15:20:59 +0200 Subject: [PATCH] Added start of package manager. --- scripts/package_manager/pm_client.lua | 17 +++++++++++++++++ scripts/package_manager/test.lua | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 scripts/package_manager/pm_client.lua create mode 100644 scripts/package_manager/test.lua diff --git a/scripts/package_manager/pm_client.lua b/scripts/package_manager/pm_client.lua new file mode 100644 index 0000000..17378f6 --- /dev/null +++ b/scripts/package_manager/pm_client.lua @@ -0,0 +1,17 @@ +local component = require("component") +local event = require("event") +local modem = component.modem + +local PORT = 80 +local PROTOCOL = "pm" + +local function initialize() + modem.open(PORT) + print("Initialized pm_client on port " .. PORT) +end + +-- Main Program Script +local action = arg[1] +if action == nil then + print("No action specified.") +end diff --git a/scripts/package_manager/test.lua b/scripts/package_manager/test.lua new file mode 100644 index 0000000..97316f0 --- /dev/null +++ b/scripts/package_manager/test.lua @@ -0,0 +1,8 @@ +-- Main Program Script +local action = arg[1] +if action == nil then + print("No action specified.") + os.exit() +end + +print("You entered the action: " .. action)