lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.4k stars 434 forks source link

Add as Copr repo #304

Open jgrund opened 4 years ago

jgrund commented 4 years ago

It would be useful to have a Copr repo for easy usage with RHEL / CentOS.

pplmx commented 3 years ago

Any Progress?

pplmx commented 3 years ago

FYI.

Install on RHEL/CentOS

Author="Peltoche"; Repo="lsd"; latest_url="https://api.github.com/repos/$Author/$Repo/releases/latest"; \
    V=$(curl --silent $latest_url | grep -Eo '"tag_name": "v?(.*)"' | sed -E 's/.*"([^"]+)".*/\1/'); \
    Latest_tar="$Repo-$V-x86_64-unknown-linux-musl.tar.gz" \
    && curl -sOL "https://github.com/$Author/$Repo/releases/download/$V/$Latest_tar" \
    && tar xzvf $Latest_tar -C . \
    && sudo sh -c "cp ./$Repo-$V-x86_64-unknown-linux-musl/$Repo /usr/local/bin/$Repo" \
    && rm $Latest_tar

Reference from

https://github.com/sharkdp/bat/issues/325#issuecomment-697947031

For bat, you can follow this:

Author="sharkdp"; Repo="bat"; latest_url="https://api.github.com/repos/$Author/$Repo/releases/latest"; \
    V=$(curl --silent $latest_url | grep -Eo '"tag_name": "v?(.*)"' | sed -E 's/.*"([^"]+)".*/\1/'); \
    Latest_tar="$Repo-$V-x86_64-unknown-linux-musl.tar.gz" \
    && curl -sOL "https://github.com/$Author/$Repo/releases/download/$V/$Latest_tar" \
    && tar xzvf $Latest_tar -C . \
    && sudo sh -c "cp ./$Repo-$V-x86_64-unknown-linux-musl/$Repo /usr/local/bin/$Repo" \
    && rm $Latest_tar
meain commented 3 years ago

Anyone who would like to package this up for any operating system is welcome. Most of the packages for lsd are maintained by external maintainers. Feel free to reach out if you need help with the releases like having a specific architecture supported.