Skip to content

Commit

Permalink
get vintpm
Browse files Browse the repository at this point in the history
  • Loading branch information
tacheraSasi committed Dec 16, 2024
1 parent 450867b commit 6a5cb84
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Binary file added binaries/vintLang_android_arm64.tar.gz
Binary file not shown.
Binary file modified binaries/vintLang_linux_amd64.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions http.vint
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import http
PORT = "3000"

dir = "/var/www/html"
// dir="/home/tach/Documents/homeFirefox/"

http.fileServer(PORT,dir,"server running on "+PORT)
16 changes: 8 additions & 8 deletions toolkit/toolkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ func detectPlatform() string {
func getBinaryName(platform string) string {
switch platform {
case "linux":
return "vintLang_linux_amd64.tar.gz"
return "vintpm_linux_amd64.tar.gz"
case "macos":
return "vintLang_macos_amd64.tar.gz"
return "vintpm_macos_amd64.tar.gz"
case "android":
return "vintLang_android_arm64.tar.gz"
return "vintpm_android_arm64.tar.gz"
case "windows":
return "vintLang_windows_amd64.zip"
return "vintpm_windows_amd64.zip"
default:
return ""
}
}

func fetchLatestReleaseURL(binaryName string) (string, error) {
resp, err := http.Get("https://api.github.com/repos/ekilie/vint-lang/releases/latest")
resp, err := http.Get("https://api.github.com/repos/ekilie/vintpm/releases/latest")
if err != nil {
return "", err
}
Expand Down Expand Up @@ -149,7 +149,7 @@ func installBinary(binaryName, platform string) error {
return nil
}

func Update() {
func InstallVintpm() {
platform := detectPlatform()
if platform == "unsupported" {
fmt.Println("Unsupported platform. Exiting.")
Expand All @@ -175,7 +175,7 @@ func Update() {
return
}

fmt.Println("Installing the new binary...")
fmt.Println("Installing vintpm...")
if err := installBinary(binaryName, platform); err != nil {
fmt.Printf("Error installing binary: %v\n", err)
return
Expand All @@ -192,7 +192,7 @@ func Update() {
func Get(pkg string) {
switch pkg {
case "vintpm":
fmt.Println("Installing vintpm...")
InstallVintpm()
}
}

Expand Down

0 comments on commit 6a5cb84

Please sign in to comment.