Licensing

This commit is contained in:
AlexSSD7 2023-09-02 20:11:25 +01:00
commit 666f62edf5
3 changed files with 51 additions and 0 deletions

34
cmd/copyright.go Normal file
View file

@ -0,0 +1,34 @@
// Linsk - A utility to access Linux-native file systems on non-Linux operating systems.
// Copyright (c) 2023 The Linsk Authors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var copyrightCmd = &cobra.Command{
Use: "copyright",
Short: "Show copyright and licensing information.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Print(`Copyright (c) 2023 The Linsk Authors
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions set by the GNU General Public License v3.
You can view the full license in the LICENSE file supplied with the source code of this program.
`)
},
}

View file

@ -66,6 +66,7 @@ func init() {
rootCmd.AddCommand(cleanCmd)
rootCmd.AddCommand(buildCmd)
rootCmd.AddCommand(versionCmd)
rootCmd.AddCommand(copyrightCmd)
rootCmd.PersistentFlags().BoolVar(&vmDebugFlag, "vm-debug", false, "Enables the VM debug mode. This will open an accessible VM monitor. You can log in with root user and no password.")
rootCmd.PersistentFlags().BoolVar(&unrestrictedNetworkingFlag, "vm-unrestricted-networking", false, "Enables unrestricted networking. This will allow the VM to connect to the internet.")