mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-08 11:06:48 +00:00
- Refactored README.md - Added workflows for version export and management. - Removed src directory, following Go best practices - Added COMMANDS.md documentation Saving the AI semi-slop for now with broken states to get a snapshot. Too lazy to setup another chained repo.
35 lines
927 B
Go
35 lines
927 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
|
|
"awalsh128.com/cache-apt-pkgs-action/internal/pkgs"
|
|
)
|
|
|
|
func restore(cmd *Cmd, pkgArgs pkgs.Packages) error {
|
|
return fmt.Errorf("restorePackages not implemented")
|
|
}
|
|
|
|
func GetRestoreCmd() *Cmd {
|
|
cmd := &Cmd{
|
|
Name: "restore",
|
|
Description: "Restore packages from the cache",
|
|
Flags: flag.NewFlagSet("restore", flag.ExitOnError),
|
|
Run: restore,
|
|
}
|
|
cmd.Flags.String(
|
|
"cache-dir",
|
|
"",
|
|
"Directory that holds the cached packages, JSON manifest and package lists in text format",
|
|
)
|
|
cmd.Flags.String("restore-root", "/", "Root directory to untar the cached packages to")
|
|
cmd.Flags.Bool("execute-scripts", false, "Execute APT post-install scripts on restore")
|
|
cmd.Examples = []string{
|
|
"--cache-dir ~/cache_dir --restore-root / --execute-scripts true",
|
|
"--cache-dir /tmp/cache_dir --restore-root /",
|
|
}
|
|
cmd.ExamplePackages = ExamplePackages
|
|
return cmd
|
|
}
|