GithubHelp home page GithubHelp logo

beyondmeh / piu Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 11.0 29.52 MB

Cross platform package manager wrapper

License: ISC License

Shell 100.00%
alpine-linux arch-linux centos cross-platform debian fedora linux linux-mint macos manjaro opensuse package-manager piu platform-independent ubuntu update-checker updaters void-linux

piu's People

Contributors

abitrolly avatar beyondmeh avatar jaron-l avatar lazypwny751 avatar szezjo avatar zen0bit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

piu's Issues

Manjaro Linux: `piu u` does not upgrade packages

Hi,
first of all: Thanks for this tool, it will save time and prevent headaches!

When using piu u on my manjaro machine, this script executes the command pacman -Sy, which does not upgrade packages but only updates the cache of pacman. The correct command would be pacman -Syu or pacman -Syyu.

Rocka84

Create a logo to avoid the current non-free one

Are you artistic? Then we need you!

Uncle Sam

Pepé Le Pew is copyrighted by Warner Bros., while it's probably isn't infringing since we give credit in the README's, certain Linux distros like Debian (see the DFSG) wouldn't allow piu since the logo is considered non-free.

I would like to keep the cartoon skunk idea as a logo, but I'm not picky beyond that. An artistic masterpiece is also not required, anyone with minor art skills is welcome to contribute.

Attribution obviously would be given, since piu is open-source.

If you can't program, but can draw, now is your chance to contribute to an open-source project!

Suggestion: Organize package manager wrappers in their own files

Looking at the code I felt the urge to split the wrapper implementations in separate files like so:

- piu
- piu.bats
- wrappers/
     - apt.sh
     - apt.bats
     - brew.sh
     - brew.bats
     - pacman.sh
     - pacman.bats

It doesn't have to be done all at once. They can be individually split over time. Will most likely allow us to work on various features in parallel without conflicts, since now everyone should be editing the same file to do anything really.

Edit: Just realized that would break the installation process since right now one is prompted to download and copy the piu file into the bin directory. So the options are:

  1. Entierly dismiss the possibility of having more than one file in the source code
  2. Change the installation to require a clone (or download of a release bundle) and create a symlink to the bin directory
  3. Have a build CI that would concatenate everything together on every release and publish a single file with all the code. Still the instructions would change to downloading the release instead of a raw source file but the rest of the instalation remains the same (user would have to copy the piu file to their bin directory instead of linking it)

So i guess the scope of this is a bit more than I initially thought. I'd be interested in hearing what you think about all that.

Add Void Linux package management

Currently piu only can update the package cache and print the number of package updates. All installs, removals, and package updating is not implemented yet.

piu files

What do you think about adding piu files for listing files provided by a package?

For dnf based installs it would be dnf repoquery -l with optional -C flag to avoid cache update.

Refactor Arch Linux's `piu files`

# HELPWANTED:
# The below code will fail on similar named packages
# like chromium and chromium-bsu. The problem is two-fold
#
# 1. pacman searching needs to use ^PACKAGE$ to match 
# exact names. `pacman -Qs $$@^` doesn't work, but how to 
# properly escape is beyond me.
#
# 2. Output from `pacman -Sw` should be captured to get the
# exact filename of the package. Calling `ls` is sloppy 

if ! pacman -Qs "$@" >/dev/null; then
	sudo pacman -Sw --noconfirm "$@"
	pacman -Qlp $(ls /var/cache/pacman/pkg/$@*)
else
	pacman -Ql "$@"
fi

piu's future!

piu's Future

It has been wild seeing others contribute and add functionality to this project! I want to make a few changes to contribute back to everyone that's helped.

Credit where credit is due:

  • I'll be creating a CONTRIBUTORS file with everyone's information to thank everyone.
    • I want to make it clear I'll accept PR's to change your attribution to whatever you'd like:
      real name, user name, twitter account, website, email, etc (We've all seen CONTRIBUTOR files at some point)
  • I'm also creating a CONTRIBUTING file. Something short and sweet like:

    piu is supported and made possible by contributors like you! Submit a pull request today!

Expanding the Project
piu is going to become an organization on GitHub: "The PIU Project". The switchover will occur around the v2.0 mark.


I'm open to general feedback and any non-code suggestions you might have, please feel free to leave a comment here!

Brew errors when passed -y

I use this package to write cross platform set up scripts. As part of that script, I need to install several packages. On at least apt, dnf, and yum, if you want to install a package without a confirmation prompt, you have to pass a “-y" confirmation flag; however, on brew, there is no confirmation flag so the command always fails when passing the flag.

I could probably pretty easily write a PR to make this package not pass on the "-y" flag to brew. Any other ideas on a better way to handle this?

Manual installing doesn't work

Recently I tested piu on Pop!_OS 21.04 (it's Ubuntu derivative, so it uses apt) and unfortunately manual installing seems to not work. From what I understand, instead of typing a command like this:
sudo dpkg -i filename.deb
I should do something like this:
piu m filename.deb
But the only thing displayed was this error:

dpkg: error: --install needs at least one package archive file argument

Type dpkg --help for help about installing and uninstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

It seemed for me like it wasn't catching a file path at all, so I did some digging and manual in fact wasn't getting any variable at all:

        [mM]|[mM][aA][nN][uU][aA][lL])
		eval ${PKGMAN}_manual
		bye
	;;

So I think the fix should like that:

        [mM]|[mM][aA][nN][uU][aA][lL])
		shift 1
		eval ${PKGMAN}_manual "$@"
		bye
	;;

The only question I really had if it was a bug or not, maybe I should use piu m the other way, but from what I have seen in the code, it doesn't seem like this is the case. Also sorry if when suggesting a fix it should be a pull request or something - it's my first time entering an issue to open-source project, so I really don't know how the process goes, to be completely honest.

Installation command does not work (Ubuntu 20.04.1 LTS)

The syntax of the curl command seems to be wrong:

$ curl -o https://raw.githubusercontent.com/beyondmeh/piu/master/piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

Seems like it should be like so:

curl https://raw.githubusercontent.com/beyondmeh/piu/master/piu -o piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu

or

wget https://raw.githubusercontent.com/beyondmeh/piu/master/piu && sudo mv piu /usr/local/bin && sudo chmod +x /usr/local/bin/piu

Package for Homebrew

It would be convenient to install/update piu with brew instead of copy/pasting curl command. I can create the formula, but the repo needs to carry version tags for the latest and greatest release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.