From 368612b70fa4fd764b688f6c8146cd125cda39ca Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 15 Jun 2024 13:16:51 +0000 Subject: [PATCH] Fix install script for macos --- get-xpipe.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/get-xpipe.sh b/get-xpipe.sh index 9a7ad4f18..3a98a6961 100644 --- a/get-xpipe.sh +++ b/get-xpipe.sh @@ -206,24 +206,26 @@ while getopts 'sv:' OPTION; do esac done -if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then - info "Installing from AUR at $aur" - rm -rf "/tmp/xpipe_aur" || true - if [[ -z "$version" ]] ; then - git clone "$aur" /tmp/xpipe_aur - else - git clone --branch "$version" "$aur" /tmp/xpipe_aur +if [ "$(uname -s)" = "Linux" ]; then + if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then + info "Installing from AUR at $aur" + rm -rf "/tmp/xpipe_aur" || true + if [[ -z "$version" ]] ; then + git clone "$aur" /tmp/xpipe_aur + else + git clone --branch "$version" "$aur" /tmp/xpipe_aur + fi + cd "/tmp/xpipe_aur" + makepkg -si + launch + exit 0 fi - cd "/tmp/xpipe_aur" - makepkg -si - launch - exit 0 -fi -if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then - info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of $product_name?" - info "https://github.com/xpipe-io/xpipe#portable" - exit 1 + if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then + info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of $product_name?" + info "https://github.com/xpipe-io/xpipe#portable" + exit 1 + fi fi download_archive="$(