3 Commits
Author SHA1 Message Date
EnumDev 6472a113cf Added a new subcommand that lets you view what packages a file is managed by 2024-04-18 12:14:38 +03:00
EnumDev d3f1c52202 Added environment variables that can be used during source package compilation to fetch package info (i.e $BPM_PKG_NAME or $BPM_PKG_VERSION)
Packages created using the -b flag will now contain the version number in their filename
Source install scripts will now exit if any error is encountered
Obsolete files should now be removed properly
2024-04-17 21:26:18 +03:00
EnumDev b568d4db32 Added a way to include files in a source package that can be used during the compilation process (i.e patch files) 2024-04-16 21:04:36 +03:00
9 changed files with 291 additions and 232 deletions
+7 -6
View File
@@ -77,7 +77,7 @@ mkdir files
5) Either copy the bpm-create script from the bpm-utils test package into your /usr/local/bin directory or install the bpm-utils.bpm package 5) Either copy the bpm-create script from the bpm-utils test package into your /usr/local/bin directory or install the bpm-utils.bpm package
6) Run the following 6) Run the following
``` ```
bpm-create <filename_without_extension> bpm-create <filename.bpm>
``` ```
7) It's done! You now hopefully have a working BPM package! 7) It's done! You now hopefully have a working BPM package!
### Source Packages ### Source Packages
@@ -85,10 +85,11 @@ bpm-create <filename_without_extension>
``` ```
touch source.sh touch source.sh
``` ```
4) You are able to run bash code in this file. BPM will extract this file in a directory under /tmp and it will be ran there 4) If you would like to bundle patches or other files with your source package create a 'source-files' directory and place your files in there. They will be extracted to the same location as the source.sh file during compilation
5) Your goal is to download your program's source code with either git, wget, curl, etc. and put the binaries under a folder called 'output' in the root of the temp directory. There is a simple example script with helpful comments in the htop-src test package 5) You are able to run bash code in source.sh. BPM will extract this file in a directory under /tmp and it will be run there
6) As of this moment there is no script to automate package compression like for binary packages. You will need to create the archive manually 6) Your goal is to download your program's source code with either git, wget, curl, etc. and put the binaries under a folder called 'output' in the root of the temp directory. There is a simple example script with helpful comments in the htop-src test package
7) When you are done making your source.sh script run the following to create a package archive
``` ```
tar -czvf my_package-src.bpm pkg.info source.sh bpm-create <filename.bpm>
``` ```
7) That's it! Your source package should now be compiling correctly! 8) That's it! Your source package should now be compiling correctly!
+197 -169
View File
@@ -8,7 +8,6 @@ import (
"fmt" "fmt"
"io" "io"
"io/fs" "io/fs"
"log"
"os" "os"
"os/exec" "os/exec"
"path" "path"
@@ -304,6 +303,16 @@ func InstallPackage(filename, installDir string, force, binaryPkgFromSrc, keepTe
} }
} }
} else if pkgInfo.Type == "source" { } else if pkgInfo.Type == "source" {
temp := "/var/tmp/bpm_source-" + pkgInfo.Name
err = os.RemoveAll(temp)
if err != nil {
return err
}
err = os.Mkdir(temp, 0755)
fmt.Println("Creating temp directory at: " + temp)
if err != nil {
return err
}
for { for {
header, err := tr.Next() header, err := tr.Next()
if err == io.EOF { if err == io.EOF {
@@ -312,151 +321,207 @@ func InstallPackage(filename, installDir string, force, binaryPkgFromSrc, keepTe
if err != nil { if err != nil {
return err return err
} }
if strings.HasPrefix(header.Name, "source-files/") && header.Name != "source-files/" {
extractFilename := path.Join(temp, strings.TrimPrefix(header.Name, "source-files/"))
switch header.Typeflag {
case tar.TypeDir:
if err := os.Mkdir(extractFilename, 0755); err != nil {
if !os.IsExist(err) {
return err
}
} else {
fmt.Println("Creating Directory: " + extractFilename)
}
case tar.TypeReg:
err := os.Remove(extractFilename)
if err != nil && !os.IsNotExist(err) {
return err
}
outFile, err := os.Create(extractFilename)
fmt.Println("Creating File: " + extractFilename)
if err != nil {
return err
}
if _, err := io.Copy(outFile, tr); err != nil {
return err
}
if err := os.Chmod(extractFilename, header.FileInfo().Mode()); err != nil {
return err
}
err = outFile.Close()
if err != nil {
return err
}
case tar.TypeSymlink:
fmt.Println("Skipping symlink (Bundling symlinks in source packages is not supported)")
case tar.TypeLink:
fmt.Println("Skipping hard link (Bundling hard links in source packages is not supported)")
default:
return errors.New("ExtractTarGz: unknown type: " + strconv.Itoa(int(header.Typeflag)) + " in " + extractFilename)
}
}
if header.Name == "source.sh" { if header.Name == "source.sh" {
bs, err := io.ReadAll(tr) bs, err := io.ReadAll(tr)
if err != nil { if err != nil {
return err return err
} }
temp := "/var/tmp/bpm_source-" + pkgInfo.Name
err = os.RemoveAll(temp)
if err != nil {
return err
}
err = os.Mkdir(temp, 0755)
fmt.Println("Creating temp directory at: " + temp)
if err != nil {
return err
}
err = os.WriteFile(path.Join(temp, "source.sh"), bs, 0644) err = os.WriteFile(path.Join(temp, "source.sh"), bs, 0644)
if err != nil { if err != nil {
return err return err
} }
fmt.Println("Running source.sh file...") }
cmd := exec.Command("/usr/bin/sh", "source.sh") }
cmd.Stdin = os.Stdin if _, err := os.Stat(path.Join(temp, "source.sh")); os.IsNotExist(err) {
cmd.Stdout = os.Stdout return errors.New("source.sh file could not be found in the temporary build directory")
cmd.Stderr = os.Stderr }
cmd.Dir = temp if err != nil {
err = cmd.Run() return err
}
fmt.Println("Running source.sh file...")
if err != nil {
return err
}
cmd := exec.Command("/bin/bash", "-e", "source.sh")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Dir = temp
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_NAME=%s", pkgInfo.Name))
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_DESC=%s", pkgInfo.Description))
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_VERSION=%s", pkgInfo.Version))
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_URL=%s", pkgInfo.Url))
depends := make([]string, len(pkgInfo.Depends))
copy(depends, pkgInfo.Depends)
for i := 0; i < len(depends); i++ {
depends[i] = fmt.Sprintf("\"%s\"", depends[i])
}
makeDepends := make([]string, len(pkgInfo.MakeDepends))
copy(makeDepends, pkgInfo.MakeDepends)
for i := 0; i < len(makeDepends); i++ {
makeDepends[i] = fmt.Sprintf("\"%s\"", makeDepends[i])
}
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_DEPENDS=(%s)", strings.Join(depends, " ")))
cmd.Env = append(cmd.Env, fmt.Sprintf("BPM_PKG_MAKE_DEPENDS=(%s)", strings.Join(makeDepends, " ")))
cmd.Env = append(cmd.Env, "BPM_PKG_TYPE=source")
err = cmd.Run()
if err != nil {
return err
}
if _, err := os.Stat(path.Join(temp, "/output/")); err != nil {
if os.IsNotExist(err) {
return errors.New("Output directory not be found at " + path.Join(temp, "/output/"))
}
return err
}
fmt.Println("Copying all files...")
err = filepath.WalkDir(path.Join(temp, "/output/"), func(fullpath string, d fs.DirEntry, err error) error {
relFilename, err := filepath.Rel(path.Join(temp, "/output/"), fullpath)
if relFilename == "." {
return nil
}
extractFilename := path.Join(installDir, relFilename)
if err != nil {
return err
}
if d.Type() == os.ModeDir {
files = append(files, relFilename+"/")
if err := os.Mkdir(extractFilename, 0755); err != nil {
if !os.IsExist(err) {
return err
}
} else {
fmt.Println("Creating Directory: " + extractFilename)
}
} else if d.Type().IsRegular() {
err := os.Remove(extractFilename)
if err != nil && !os.IsNotExist(err) {
return err
}
outFile, err := os.Create(extractFilename)
fmt.Println("Creating File: " + extractFilename)
files = append(files, relFilename)
if err != nil { if err != nil {
return err return err
} }
if _, err := os.Stat(path.Join(temp, "/output/")); err != nil { f, err := os.Open(fullpath)
if os.IsNotExist(err) {
return errors.New("Output directory not be found at " + path.Join(temp, "/output/"))
}
return err
}
fmt.Println("Copying all files...")
err = filepath.WalkDir(path.Join(temp, "/output/"), func(fullpath string, d fs.DirEntry, err error) error {
relFilename, err := filepath.Rel(path.Join(temp, "/output/"), fullpath)
if relFilename == "." {
return nil
}
extractFilename := path.Join(installDir, relFilename)
if err != nil {
return err
}
if d.Type() == os.ModeDir {
files = append(files, relFilename+"/")
if err := os.Mkdir(extractFilename, 0755); err != nil {
if !os.IsExist(err) {
return err
}
} else {
fmt.Println("Creating Directory: " + extractFilename)
}
} else if d.Type().IsRegular() {
err := os.Remove(extractFilename)
if err != nil && !os.IsNotExist(err) {
return err
}
outFile, err := os.Create(extractFilename)
fmt.Println("Creating File: " + extractFilename)
files = append(files, relFilename)
if err != nil {
return err
}
f, err := os.Open(fullpath)
if err != nil {
return err
}
if _, err := io.Copy(outFile, f); err != nil {
return err
}
info, err := os.Stat(fullpath)
if err != nil {
return err
}
if err := os.Chmod(extractFilename, info.Mode()); err != nil {
return err
}
err = outFile.Close()
if err != nil {
return err
}
err = f.Close()
if err != nil {
return err
}
} else if d.Type() == os.ModeSymlink {
link, err := os.Readlink(fullpath)
if err != nil {
return err
}
err = os.Remove(extractFilename)
if err != nil && !os.IsNotExist(err) {
return err
}
fmt.Println("Creating Symlink: "+extractFilename, " -> "+link)
files = append(files, relFilename)
err = os.Symlink(link, extractFilename)
if err != nil {
return err
}
}
return nil
})
if err != nil { if err != nil {
return err return err
} }
if binaryPkgFromSrc { if _, err := io.Copy(outFile, f); err != nil {
compiledDir := path.Join(installDir, "var/lib/bpm/compiled/") return err
err = os.MkdirAll(compiledDir, 755)
compiledInfo := PackageInfo{}
compiledInfo = *pkgInfo
compiledInfo.Type = "binary"
compiledInfo.Arch = GetArch()
err = os.WriteFile(path.Join(compiledDir, "pkg.info"), []byte(CreateInfoFile(compiledInfo)), 0644)
if err != nil {
return err
}
sed := fmt.Sprintf("s/%s/files/", strings.Replace(strings.TrimPrefix(path.Join(temp, "/output/"), "/"), "/", `\/`, -1))
cmd := exec.Command("/usr/bin/tar", "-czvf", compiledInfo.Name+".bpm", "pkg.info", path.Join(temp, "/output/"), "--transform", sed)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Dir = compiledDir
fmt.Printf("running command: %s %s\n", cmd.Path, strings.Join(cmd.Args, " "))
err := cmd.Run()
if err != nil {
return err
}
err = os.Remove(path.Join(compiledDir, "pkg.info"))
if err != nil {
return err
}
} }
if !keepTempDir { info, err := os.Stat(fullpath)
err := os.RemoveAll(temp) if err != nil {
if err != nil { return err
return err
}
} }
if len(files) == 0 { if err := os.Chmod(extractFilename, info.Mode()); err != nil {
return errors.New("no output files for source package. Cancelling package installation") return err
}
err = outFile.Close()
if err != nil {
return err
}
err = f.Close()
if err != nil {
return err
}
} else if d.Type() == os.ModeSymlink {
link, err := os.Readlink(fullpath)
if err != nil {
return err
}
err = os.Remove(extractFilename)
if err != nil && !os.IsNotExist(err) {
return err
}
fmt.Println("Creating Symlink: "+extractFilename, " -> "+link)
files = append(files, relFilename)
err = os.Symlink(link, extractFilename)
if err != nil {
return err
} }
} }
return nil
})
if err != nil {
return err
}
if binaryPkgFromSrc {
compiledDir := path.Join(installDir, "var/lib/bpm/compiled/")
err = os.MkdirAll(compiledDir, 755)
compiledInfo := PackageInfo{}
compiledInfo = *pkgInfo
compiledInfo.Type = "binary"
compiledInfo.Arch = GetArch()
err = os.WriteFile(path.Join(compiledDir, "pkg.info"), []byte(CreateInfoFile(compiledInfo)), 0644)
if err != nil {
return err
}
sed := fmt.Sprintf("s/%s/files/", strings.Replace(strings.TrimPrefix(path.Join(temp, "/output/"), "/"), "/", `\/`, -1))
cmd := exec.Command("/usr/bin/tar", "-czvf", compiledInfo.Name+"-"+compiledInfo.Version+".bpm", "pkg.info", path.Join(temp, "/output/"), "--transform", sed)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Dir = compiledDir
fmt.Printf("running command: %s %s\n", cmd.Path, strings.Join(cmd.Args, " "))
err := cmd.Run()
if err != nil {
return err
}
err = os.Remove(path.Join(compiledDir, "pkg.info"))
if err != nil {
return err
}
}
if !keepTempDir {
err := os.RemoveAll(temp)
if err != nil {
return err
}
}
if len(files) == 0 {
return errors.New("no output files for source package. Cancelling package installation")
} }
} else { } else {
return errors.New("Unknown package type: " + pkgInfo.Type) return errors.New("Unknown package type: " + pkgInfo.Type)
@@ -526,7 +591,11 @@ func InstallPackage(filename, installDir string, force, binaryPkgFromSrc, keepTe
if len(filesDiff) != 0 { if len(filesDiff) != 0 {
fmt.Println("Removing obsolete files") fmt.Println("Removing obsolete files")
for _, f := range filesDiff { for _, f := range filesDiff {
fmt.Println("Removing: " + path.Join(installedDir, f)) err := os.RemoveAll(path.Join(installDir, f))
if err != nil {
return err
}
fmt.Println("Removing: " + path.Join(installDir, f))
} }
} }
return nil return nil
@@ -783,44 +852,3 @@ func RemovePackage(pkg, rootDir string) error {
fmt.Println("Removing: " + pkgDir) fmt.Println("Removing: " + pkgDir)
return nil return nil
} }
func FixInstalledPackages(rootDir string) (map[string]error, int) {
var errs map[string]error
totalFixed := 0
pkgs, err := GetInstalledPackages(rootDir)
if err != nil {
log.Fatalf("Could not check if installed package info files are formatted correctly\nError: %s", err.Error())
}
for _, pkg := range pkgs {
fixed := false
pkgInfo := GetPackageInfo(pkg, "/", true)
if pkgInfo.Name == "" {
errs[pkg] = errors.New("this package contains no name")
continue
}
if pkgInfo.Description == "" {
pkgInfo.Description = "Default Description"
fixed = true
}
if pkgInfo.Version == "" {
errs[pkg] = errors.New("this package contains no version")
continue
}
if pkgInfo.Arch == "" {
pkgInfo.Arch = GetArch()
fixed = true
}
if pkgInfo.Type == "" {
errs[pkg] = errors.New("this package contains no type")
continue
}
if fixed {
totalFixed++
}
err := setPackageInfo(pkg, CreateInfoFile(*pkgInfo), rootDir)
if err != nil {
log.Fatalf("Could not check if installed package info files are formatted correctly\nError: %s", err.Error())
}
}
return errs, totalFixed
}
+74 -51
View File
@@ -7,6 +7,8 @@ import (
"fmt" "fmt"
"log" "log"
"os" "os"
"path/filepath"
"slices"
"strings" "strings"
) )
@@ -15,7 +17,7 @@ import (
/* A simple-to-use package manager */ /* A simple-to-use package manager */
/* ---------------------------------- */ /* ---------------------------------- */
var bpmVer = "0.1.1" var bpmVer = "0.1.4"
var subcommand = "help" var subcommand = "help"
var subcommandArgs []string var subcommandArgs []string
@@ -43,7 +45,7 @@ const (
list list
install install
remove remove
cleanup file
) )
func getCommandType() commandType { func getCommandType() commandType {
@@ -58,12 +60,11 @@ func getCommandType() commandType {
return install return install
case "remove": case "remove":
return remove return remove
case "cleanup": case "file":
return cleanup return file
default: default:
return help return help
} }
} }
func resolveCommand() { func resolveCommand() {
@@ -251,6 +252,53 @@ func resolveCommand() {
} }
fmt.Printf("Package (%s) was successfully removed!\n", pkgInfo.Name) fmt.Printf("Package (%s) was successfully removed!\n", pkgInfo.Name)
} }
case file:
files := subcommandArgs
if len(files) == 0 {
fmt.Println("No files were given to get which packages manage it")
return
}
for _, file := range files {
absFile, err := filepath.Abs(file)
if err != nil {
log.Fatalf("Could not get absolute path of %s", file)
}
stat, err := os.Stat(absFile)
if os.IsNotExist(err) {
log.Fatalf(absFile + " does not exist!")
}
pkgs, err := bpm_utils.GetInstalledPackages(rootDir)
if err != nil {
log.Fatalf("Could not get installed packages. Error %s", err.Error())
}
if !strings.HasPrefix(absFile, rootDir) {
log.Fatalf("Could not get relative path of %s to root path", absFile)
}
absFile, err = filepath.Rel(rootDir, absFile)
if err != nil {
log.Fatalf("Could not get relative path of %s to root path", absFile)
}
absFile = strings.TrimPrefix(absFile, "/")
if stat.IsDir() {
absFile = absFile + "/"
}
var pkgList []string
for _, pkg := range pkgs {
if slices.Contains(bpm_utils.GetPackageFiles(pkg, rootDir), absFile) {
pkgList = append(pkgList, pkg)
}
}
if len(pkgList) == 0 {
fmt.Println(absFile + " is not managed by any packages")
} else {
fmt.Println(absFile + " is managed by the following packages:")
for _, pkg := range pkgList {
fmt.Println("- " + pkg)
}
}
}
default: default:
printHelp() printHelp()
} }
@@ -263,18 +311,23 @@ func printHelp() {
fmt.Println("-> flags will be read if passed right after the subcommand otherwise they will be read as subcommand arguments") fmt.Println("-> flags will be read if passed right after the subcommand otherwise they will be read as subcommand arguments")
fmt.Println("\033[1m\\ Command List /\033[0m") fmt.Println("\033[1m\\ Command List /\033[0m")
fmt.Println("-> bpm version | shows information on the installed version of bpm") fmt.Println("-> bpm version | shows information on the installed version of bpm")
fmt.Println("-> bpm info | shows information on an installed package") fmt.Println("-> bpm info [-R] | shows information on an installed package")
fmt.Println("-> bpm list [-n, -l] | lists all installed packages") fmt.Println(" -R=<root_path> lets you define the root path which will be used")
fmt.Println("-> bpm list [-R, -n, -l] | lists all installed packages")
fmt.Println(" -R=<root_path> lets you define the root path which will be used")
fmt.Println(" -n shows the number of packages") fmt.Println(" -n shows the number of packages")
fmt.Println(" -l lists package names only") fmt.Println(" -l lists package names only")
fmt.Println("-> bpm install [-y, -f, -b] <files...> | installs the following files") fmt.Println("-> bpm install [-R, -y, -f, -b] <files...> | installs the following files")
fmt.Println(" -R=<root_path> lets you define the root path which will be used")
fmt.Println(" -y skips the confirmation prompt") fmt.Println(" -y skips the confirmation prompt")
fmt.Println(" -f skips dependency and architecture checking") fmt.Println(" -f skips dependency and architecture checking")
fmt.Println(" -b creates a binary package for a source package after compilation and saves it in /var/lib/bpm/compiled") fmt.Println(" -b creates a binary package for a source package after compilation and saves it in /var/lib/bpm/compiled")
fmt.Println(" -k keeps the temp directory created by BPM after source package installation") fmt.Println(" -k keeps the temp directory created by BPM after source package installation")
fmt.Println("-> bpm remove [-y] <packages...> | removes the following packages") fmt.Println("-> bpm remove [-R, -y] <packages...> | removes the following packages")
fmt.Println(" -R=<root_path> lets you define the root path which will be used")
fmt.Println(" -y skips the confirmation prompt") fmt.Println(" -y skips the confirmation prompt")
//fmt.Println("-> bpm cleanup | removes all unneeded dependencies") fmt.Println("-> bpm file [-R] <files...> | shows what packages the following packages are managed by")
fmt.Println(" -R=<root_path> lets you define the root path which will be used")
fmt.Println("\033[1m----------------\033[0m") fmt.Println("\033[1m----------------\033[0m")
} }
@@ -303,6 +356,11 @@ func resolveFlags() {
removeFlagSet.StringVar(&rootDir, "R", "/", "Set the destination root") removeFlagSet.StringVar(&rootDir, "R", "/", "Set the destination root")
removeFlagSet.BoolVar(&yesAll, "y", false, "Skip confirmation prompts") removeFlagSet.BoolVar(&yesAll, "y", false, "Skip confirmation prompts")
removeFlagSet.Usage = printHelp removeFlagSet.Usage = printHelp
// File flags
// Remove flags
fileFlagSet := flag.NewFlagSet("Remove flags", flag.ExitOnError)
fileFlagSet.StringVar(&rootDir, "R", "/", "Set the destination root")
fileFlagSet.Usage = printHelp
if len(os.Args[1:]) <= 0 { if len(os.Args[1:]) <= 0 {
subcommand = "help" subcommand = "help"
} else { } else {
@@ -332,47 +390,12 @@ func resolveFlags() {
return return
} }
subcommandArgs = removeFlagSet.Args() subcommandArgs = removeFlagSet.Args()
} else if getCommandType() == file {
err := fileFlagSet.Parse(subcommandArgs)
if err != nil {
return
}
subcommandArgs = fileFlagSet.Args()
} }
} }
} }
/*func resolveFlags() ([]string, int) {
flags := getArgs()[1:]
var ret []string
for _, flag := range flags {
if strings.HasPrefix(flag, "-") {
f := strings.TrimPrefix(flag, "-")
switch getCommandType() {
default:
log.Fatalf("Invalid flag " + flag)
case list:
v := [...]string{"l", "n"}
if !slices.Contains(v[:], f) {
log.Fatalf("Invalid flag " + flag)
}
ret = append(ret, f)
case install:
v := [...]string{"y", "f", "b", "k"}
if !slices.Contains(v[:], f) {
log.Fatalf("Invalid flag " + flag)
}
ret = append(ret, f)
case remove:
v := [...]string{"y", "r"}
if !slices.Contains(v[:], f) {
log.Fatalf("Invalid flag " + flag)
}
ret = append(ret, f)
case info:
v := [...]string{"r"}
if !slices.Contains(v[:], f) {
log.Fatalf("Invalid flag " + flag)
}
ret = append(ret, f)
}
} else {
break
}
}
return ret, len(ret)
}*/
Binary file not shown.
@@ -7,7 +7,7 @@ fi
output=$1 output=$1
if [[ ! "$output" =~ ^[a-zA-Z0-9_-]{1,}$ ]]; then if [[ ! "$output" =~ ^[a-z.A-Z0-9_-]{1,}$ ]]; then
echo "Invalid output name! The name must only contain letters, numbers, hyphens or underscores!" echo "Invalid output name! The name must only contain letters, numbers, hyphens or underscores!"
exit 1 exit 1
fi fi
@@ -22,6 +22,9 @@ else
if [ -f source.sh ]; then if [ -f source.sh ]; then
type="source" type="source"
echo "source.sh file found" echo "source.sh file found"
if [ -d source-files ]; then
echo "source-files/ directory found"
fi
else else
echo "files/ directory or source.sh file not found in $PWD" echo "files/ directory or source.sh file not found in $PWD"
exit 1 exit 1
@@ -35,10 +38,14 @@ else
exit 1 exit 1
fi fi
echo "Creating $type package as $output.bpm" echo "Creating $type package as $output"
if [[ "$type" == "binary" ]]; then if [[ "$type" == "binary" ]]; then
tar -czf "$output".bpm files/ pkg.info tar -czf "$output" files/ pkg.info
else else
tar -czf "$output".bpm source.sh pkg.info if [ -d source-files ]; then
tar -czf "$output" source.sh source-files/ pkg.info
else
tar -czf "$output" source.sh pkg.info
fi
fi fi
+1 -1
View File
@@ -1,6 +1,6 @@
name: bpm-utils name: bpm-utils
description: Utilities to create BPM packages description: Utilities to create BPM packages
version: 1.2.0 version: 1.3.0
url: https://gitlab.com/bubble-package-manager/bpm/ url: https://gitlab.com/bubble-package-manager/bpm/
license: GPL3 license: GPL3
architecture: x86_64 architecture: x86_64
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
name: bpm name: bpm
description: The Bubble Package Manager description: The Bubble Package Manager
version: 0.1.1 version: 0.1.4
url: https://gitlab.com/bubble-package-manager/bpm/ url: https://gitlab.com/bubble-package-manager/bpm/
license: GPL3 license: GPL3
architecture: x86_64 architecture: x86_64