utils

package
v0.0.0-...-dba81a6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2014 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Copyright (c) 2014 Canonical Ltd.

Author: Jani Monoses <jani@ubuntu.com>

Index

Constants

View Source
const SpecVersion = "0.4"
View Source
const StaticPreinst = `#! /bin/sh
echo "Click packages may not be installed directly using dpkg."
echo "Use 'click install' instead."
exit 1
`

Variables

This section is empty.

Functions

func AppendSlash

func AppendSlash(path string) string

Ensure the path ends in "/"

func Copytree

func Copytree(src, dest string, ignores []string)

cpa copies src to dest recursively, ignoring entries matching any of the ignore patterns

func CreateFakerootTarball

func CreateFakerootTarball(path, arcname string, ignores []string)

create tarball with members' ownership set to root

func CreateTarball

func CreateTarball(path, arcname string, ignores []string)

create a tarball

func EpochlessVersion

func EpochlessVersion(v string) string

func Exists

func Exists(path string) bool

Exists tells whether a file named by a path exists

func ExitError

func ExitError(err error)

func ExitMsg

func ExitMsg(msg string)

func GetDirSize

func GetDirSize(dir string) string

Get total size of all files in a dir Output of "du -ks --apparent-size"

func NewArWriter

func NewArWriter(path string) (*arWriter, error)

func Walk

func Walk(path string, fn walkFunc, ignores []string)

func WriteManifest

func WriteManifest(manifestPath string, m Manifest)

Types

type Manifest

type Manifest map[string]interface{}

func ReadManifest

func ReadManifest(manifestPath string) Manifest

Jump to

Keyboard shortcuts

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