shell

package
v0.0.0-...-ee9e2bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: BSD-2-Clause Imports: 9 Imported by: 0

README

shell

Implémentation de commandes système simples en langage go pour permettre leur usage sous linux et window. Il s'agit typiquement d'exécuter une séquence scriptée de commandes d'installation de logiciels (procédure technique d'installation).

  • Télécharger et installer un logiciel comme conda, python, openshell;
  • Cela peut nécessiter de maitriser des commandes basic comme le wget et le unzip ou tar xvzf;
  • Afficher la sortie au fur et à mesure (pas à la fin);
  • Connaître et/ou définir des variables d'environnement;
  • Accéder aux emplacements standards (home utilisateur).

Un tutoriel:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip

func Unzip(zippath string, dirpath string) (fpaths []string, err error)

Unzip decompress a zip archive, moving all files and folders within the zip file to the specifid directory (dirpath).

func Wget

func Wget(urlpath string, dirpath string) (path string, err error)

Wget is a wget-like command. It downloads the file localized on the network by the given urlpath into the local directory specified by dirpath. The output variable path is set to the local path of the downloaded file. The function creates the target directory if it does not exist yet.

Types

type ProgressBar

type ProgressBar struct {
	// contains filtered or unexported fields
}

ProgressBar can be used to display the progress of a background process on the standard output

func NewProgressBar

func NewProgressBar(total int64) ProgressBar

NewProgressBar returns an instance of ProgressBar

func (*ProgressBar) Finish

func (bar *ProgressBar) Finish()

Finish terminates the progression of the progress bar.

func (*ProgressBar) Update

func (bar *ProgressBar) Update(state int64)

Update updates the state of the progress bar. The value of state is an absolute value (comparable to the total value), and not a percentage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL