Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install a package from a local directory #169

Open
thewebmasterp opened this issue Dec 25, 2023 · 0 comments · May be fixed by #170
Open

Can't install a package from a local directory #169

thewebmasterp opened this issue Dec 25, 2023 · 0 comments · May be fixed by #170

Comments

@thewebmasterp
Copy link

I have a bunch of bash scripts on my Arch Linux machine and a few of them depend on each other so thought it'd be nice to organize them using some package management solution. bpkg seems promising but I'm running into the following
issue.

I started packaging my first script by creating its own folder ~/Documents/scripts/best-split, initialized a git repo, and put the following files:

  • best-split.sh
#!/usr/bin/env bash
# best-split

width=$(xwininfo -id "$(xdotool getwindowfocus)" | grep -E '(Width)' | awk '{print $2}')
height=$(xwininfo -id "$(xdotool getwindowfocus)" | grep -E '(Height)' | awk '{print $2}')

if [[ $width -gt $height ]]; then
    i3-msg "split h"
else
    i3-msg "split v"
fi
  • bpkg.json
{
    "name": "best-split",
    "version": "0.0.1",
    "description": "splits i3wm window either horizontally or vertically",
    "scripts": ["best-split.sh"],
    "install": "make install"
}
  • Makefile
BIN ?= best-split
PREFIX ?= ~/.local

install:
	cp best-split.sh $(PREFIX)/bin/$(BIN)

uninstall:
	rm -f $(PREFIX)/bin/$(BIN)

The files have the following permissions:

-rwxr-xr-x 1 myuser myuser 299 Dec 25 15:03 best-split.sh
-rw-r--r-- 1 myuser myuser 192 Dec 25 14:58 bpkg.json
drwxr-xr-x 1 myuser myuser 144 Dec 25 15:01 .git
-rwxr-xr-x 1 myuser myuser 126 Dec 25 14:58 Makefile

Then I run

bpkg install -g ~/Documents/scripts/best-split

And I get no output of executing the command!

It runs for 2-3 sek, exits without any output and can't find my script installed under ~/.local/bin or anywhere on my system, as if nothing has happened!

More info:

% bpkg --version
1.1.4
% ls ~/.local/bin
bpkg	      bpkg-install  bpkg-realpath  bpkg-suggest  term
bpkg-env      bpkg-json     bpkg-run	   bpkg-term	 
bpkg-getdeps  bpkg-list     bpkg-show	   bpkg-update
bpkg-init     bpkg-package  bpkg-source    bpkg-utils

*Installing term worked. The problem is when i try to insall from local directory.

Any help would be appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant