Update readme, change snap to snaps in CLI syntax for updates

This commit is contained in:
VetheonGames 2024-01-07 18:36:13 -07:00
parent 6da16766fa
commit f6dd275e79
2 changed files with 6 additions and 3 deletions

View File

@ -69,10 +69,13 @@ Once installed, you can use AllPac with the following commands:
allpac update {package_name}
```
or
```bash
allpac update {packagename1} {packagename2} {packagename3}
```
or
```bash
allpac update {aur/flats/snaps/arch}
```
- Uninstall a package:
```bash

View File

@ -53,13 +53,13 @@ func main() {
func handleUpdate(args []string) {
if len(args) == 0 {
fmt.Println("You must specify an update option: 'everything', 'snap', 'aur', 'arch', 'flats', or a specific package name.")
fmt.Println("You must specify an update option: 'everything', 'snaps', 'aur', 'arch', 'flats', or a specific package name.")
return
}
updateFuncs := map[string]func() error{
"everything": packagemanager.UpdateAllPackages,
"snap": func() error { return packagemanager.UpdateSnapPackages() },
"snaps": func() error { return packagemanager.UpdateSnapPackages() },
"aur": func() error { return packagemanager.UpdateAURPackages() },
"arch": func() error { return packagemanager.UpdatePacmanPackages() },
"flats": func() error { return packagemanager.UpdateFlatpakPackages() },