mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-11 09:25:50 +03:00
install.sh: xbps-install (void linux) support (#317)
* install.sh: xbps-install (void linux) support
This commit is contained in:
parent
a43bd3c221
commit
99698bf15c
18
.github/workflows/test-install.yml
vendored
18
.github/workflows/test-install.yml
vendored
@ -182,6 +182,24 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
void-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
container: ghcr.io/void-linux/void-glibc:latest
|
||||||
|
steps:
|
||||||
|
- name: Test install
|
||||||
|
run: |-
|
||||||
|
set -e
|
||||||
|
(xbps-install -Syu || true) && xbps-install -yu xbps curl
|
||||||
|
/bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"
|
||||||
|
if [ $(sq version | awk '{print $1}') != "sq" ]; then
|
||||||
|
# NOTE: The Void package release is a manual process.
|
||||||
|
# Thus, the released version will not match this particular
|
||||||
|
# workflow release. We'll just do a simple test here.
|
||||||
|
echo "FAIL: sq install not working for some reason"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
windows-scoop:
|
windows-scoop:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
14
install.sh
14
install.sh
@ -15,15 +15,25 @@ get_distribution() {
|
|||||||
echo "$lsb_dist"
|
echo "$lsb_dist"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage:
|
# Use command exists to test if a command is present on the system. E.g.
|
||||||
#
|
#
|
||||||
# if command_exists lsb_release; then
|
# if command_exists lsb_release; then
|
||||||
command_exists() {
|
command_exists() {
|
||||||
command -v "$@" > /dev/null 2>&1
|
command -v "$@" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
get_distribution
|
get_distribution
|
||||||
|
|
||||||
|
# Void Linux / xbps
|
||||||
|
if command_exists xbps-install; then
|
||||||
|
set -e
|
||||||
|
printf "Using xbps-install to install sq...\n\n"
|
||||||
|
|
||||||
|
(xbps-install -Syu || true) && xbps-install -yu xbps
|
||||||
|
xbps-install -yu sq
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# apt / deb
|
# apt / deb
|
||||||
if [ -r /etc/debian_version ] && command_exists apt; then
|
if [ -r /etc/debian_version ] && command_exists apt; then
|
||||||
set -e
|
set -e
|
||||||
|
Loading…
Reference in New Issue
Block a user