Last bit of updates for basic overlay support

This commit is contained in:
Gregory Kurtzer
2020-11-18 20:37:18 -08:00
parent 27441f77d3
commit 0bc53ea483
6 changed files with 145 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
package chmod
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "chmod [overlay name] [numeric mode] [file path]",
Short: "Change permissions within an overlay",
Long: "Change permissions within an overlay",
RunE: CobraRunE,
Args: cobra.ExactArgs(3),
}
SystemOverlay bool
NoOverlayUpdate bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&SystemOverlay, "system", "s", false, "Show System Overlays as well")
baseCmd.PersistentFlags().BoolVarP(&NoOverlayUpdate, "noupdate", "n", false, "Don't update overlays")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}