diff --git a/downloadjson.py b/downloadjson.py deleted file mode 100644 index 6c6b13a..0000000 --- a/downloadjson.py +++ /dev/null @@ -1,48 +0,0 @@ - -# import urllib library -from urllib.request import urlopen - -# import json -import json - -def ConnectPackage(osstr): - # store the URL in url as - # parameter for urlopen - url = "https://www.rstudio.com/wp-content/downloads.json" - - # store the response of URL - response = urlopen(url) - - # storing the JSON response - # from url in data - data_json = json.loads(response.read()) - - match osstr: - case "U20": - connect_os = "focal" - case "U22": - connect_os = "jammy" - case "RH7": - connect_os = "redhat7_64" - case "RH8": - connect_os = "redhat8" - case "RH9": - connect_os = "rhel9" - match osstr: - case "U20": - pm_os = "focal" - case "U22": - pm_os = "jammy" - case "RH7": - pm_os = "redhat7_64" - case "RH8": - pm_os = "fedora28" - case "RH9": - pm_os = "rhel9" - - connect_url = data_json['connect']['installer'][connect_os]['url'] - pm_url = data_json['rspm']['installer'][pm_os]['url'] - - # print the json response - print(connect_url) - print(pm_url) \ No newline at end of file diff --git a/main.go b/main.go index 68c46c1..65a5c6f 100644 --- a/main.go +++ b/main.go @@ -2,11 +2,13 @@ package main import ( "C" + "github.com/sol-eng/wbi/cmd" "github.com/sol-eng/wbi/internal/config" "github.com/sol-eng/wbi/internal/languages" "github.com/sol-eng/wbi/internal/prodrivers" "github.com/sol-eng/wbi/internal/quarto" "github.com/sol-eng/wbi/internal/workbench" + "os" "strings" ) @@ -18,6 +20,7 @@ var ( ) func main() { + cmd.Execute(version, os.Args[1:]) } func OSSwitch(osGo string) config.OperatingSystem {