Skip to content

Commit

Permalink
(update): make uninstaller and update module executable after AutoHeal
Browse files Browse the repository at this point in the history
  • Loading branch information
mintRaven-05 committed Dec 25, 2024
1 parent d8d35c1 commit 3d0e347
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,25 @@ func AutoHeal() {
os.Exit(1)
}

updateModCmd := exec.Command("chmod", "+x", filepath.Join(scriptDir, "update.sh"))
updateModCmd.Stdout = os.Stdout
updateModCmd.Stderr = os.Stderr

if err := updateModCmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "\033[0;33m [!] Error running shell code: %v \033[0m \n", err)
os.Exit(1)
}

uninstallModCmd := exec.Command("chmod", "+x", filepath.Join(scriptDir, "uninstall.sh"))
uninstallModCmd.Stdout = os.Stdout
uninstallModCmd.Stderr = os.Stderr

if err := uninstallModCmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "\033[0;33m [!] Error running shell code: %v \033[0m \n", err)
os.Exit(1)
}


time.Sleep(2 * time.Second)
fmt.Println("\033[0;32m [+] config.yaml configure at ~/.config/kaizen/ \033[0m")
fmt.Println("\033[0;32m [+] shell scripts downloaded and configured at ~/.local/share/kaizen/ \033[0m")
Expand Down

0 comments on commit 3d0e347

Please sign in to comment.