suaefar / ryzen-test

Tools to reproduce randomly crashing processes under load on AMD Ryzen processors on Linux
GNU General Public License v3.0
224 stars 59 forks source link

Add other package manager #2

Closed b2ag closed 7 years ago

b2ag commented 7 years ago

Hi, I'm using Arch Linux and there is no apt-get. For Arch users it should be "sudo pacman base-devel". Maybe do something like:

if PKGMGR="$( which apt-get 2>/dev/null )"; then sudo "$PKGMGR" build-essential; fi
if PKGMGR="$( which pacman 2>/dev/null )"; then sudo "$PKGMGR" base-devel; fi
...
suaefar commented 7 years ago

Hi, thank you for your suggestion.

I'm not too familiar with non-debian based distributions and dont want to invest the time. The test can always be run from an Ubuntu live system. I would accept a corresponding pull request of course.

n3ziniuka5 commented 7 years ago

I am also running arch, I simply commented out sudo apt install build-essential || exit 1 and everything worked for me.

b2ag commented 7 years ago

I created #4 to give an example how to integrate the two lines I posted.

suaefar commented 7 years ago

I'm sorry, but the implementation throws an error on Ubuntu. I had to revert the merged changes. If you want this to be merged, please provide a patch that was tested on both platforms.

b2ag commented 7 years ago

I'm sorry! Such few lines and I still got it wrong. I forgot the "install" parameter for apt-get. Frankly, I also forgot the "-S" for Arch's pacman. I created a new pull request in #5 which I have verified to work with Ubuntu 16.04.3 LTS.