commit bbadf735b8e096a47edf89f4b9b8c000fcc848c1 parent 22ad6f05e033d59331f53e42a9b0070ec550625d Author: finwo <finwo@pm.me> Date: Tue, 5 Nov 2019 20:49:59 +0100 Use the right path in install.sh Diffstat:
| M | build.sh | | | 2 | +- |
| M | install.sh | | | 17 | ++++------------- |
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/build.sh b/build.sh @@ -2,7 +2,7 @@ # Load pre-processor [ -f bashpp ] || { - wget https://raw.githubusercontent.com/iwonbigbro/bashpp/master/bin/bashpp + curl https://raw.githubusercontent.com/iwonbigbro/bashpp/master/bin/bashpp > bashpp chmod +x bashpp } diff --git a/install.sh b/install.sh @@ -15,28 +15,19 @@ cat <<EOF EOF -# Add system package -function system { - command -v apt &>/dev/null && { apt install "$1" -y -qq; return; } - command -v apt-get &>/dev/null && { apt-get install "$1" -y -qq; return; } - command -v apk &>/dev/null && { apk add "$1" ; return; } - command -v xbps-install &>/dev/null && { xbps-install "$1" ; return; } - echo "No supported package manager detected" - echo "Please install '$1' to run this script" - exit 1 -} - # Install repo binary function bin { [ -f "./$1" ] && { echo "Copying $1" cp "./$1" "/usr/local/bin/$1" - } || curl -L# "https://raw.githubusercontent.com/cdeps/dep/master/$1" > "/usr/local/bin/$1" + } || curl -L# "https://raw.githubusercontent.com/cdeps/dep/master/dist/$1" > "/usr/local/bin/$1" chmod +x "/usr/local/bin/$1" } # Ensure our dependencies -command -v curl &>/dev/null || system curl +command -v curl &>/dev/null || { + echo "cUrl needs to be installed to use dep" +} # Default install directory mkdir -p /usr/local/bin