willeccles / cpm

🌵 A wrapper for package managers to make them consistent for those of us who are lazy.
MIT License
68 stars 13 forks source link

Installation instructions are unnecessary #41

Closed willeccles closed 2 years ago

willeccles commented 2 years ago

At the very least they ought to be simplified/generalized. At worst, just remove them.

foxsouns commented 2 years ago

maybe something along the lines of

"cpm is a simple shell script. Typical use case would be to sudo install -m755 /path/to/cpm /bin/cpm"

eepykate commented 2 years ago

sudo curl https://raw.githubusercontent.com/willeccles/cpm/master/cpm -o /usr/local/bin/cpm

ez

eepykate commented 2 years ago

oh wait that's not executable nvm

foxsouns commented 2 years ago

@gk one could tack a && sudo chmod 755 /usr/local/bin/cpm and call it done, technically

eepykate commented 2 years ago

@foxsouns True, but at that point it's not really much shorter than it currently is.

willeccles commented 2 years ago

Slight improvement over gk's solution:

alias cpm='curl -SsL https://raw.githubusercontent.com/willeccles/cpm/master/cpm -o - | /bin/sh'

eepykate commented 2 years ago

@willeccles i don't think that would work lol

eepykate commented 2 years ago

image

eepykate commented 2 years ago
  1. -o - is redundant, outputting to stdout is the default behavior.
  2. it won't interpret arguments
eepykate commented 2 years ago
alias 'cpm=curl -LSs https://github.com/willeccles/cpm/raw/master/cpm | sh -s --'

should work

foxsouns commented 2 years ago

this is the best example of jumping through hoops i have ever seen only problem this presents is that you need internet for every use but most people using a package manager would have internet, anyways and this does give the benefit of always being up to date hmmm

eepykate commented 2 years ago

Who cares about system ultra-responsiveness when you can just always be uptodate?! i certainly do, but i'm the minority

also cronjobs to update are for cringes. just use the aforementioned simple solution

foxsouns commented 2 years ago

that command was 1ms too slow time to reinstall [insert distro of choice]

eepykate commented 2 years ago

I mean, on my system a help command is 0.002s (local) vs 0.857s (curled) (subsequent ones are about 155ms)

little bit more than 1ms