From a55c031a34736fd72516fa6891fad97a9966d206 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Fri, 18 Nov 2022 07:27:39 -0800 Subject: [PATCH] Fix: install.sh --- install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 02ccf7c..ebf662f 100755 --- a/install.sh +++ b/install.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash set -e - _target="$HOME/.local/bin" mkdir -vp "$_target" -rm -v "${_target}/clone-all" -echo '#!/usr/bin/env bash' >> "${_target}/clone-all" +set +e +rm "${_target}/clone-all" 2 &>/dev/null +set -e +echo '#!/usr/bin/env bash' >>"${_target}/clone-all" cd src cat ./*.sh | grep -v 'usr/bin/env' >>"${_target}/clone-all" chmod +x "${_target}/clone-all" @@ -12,4 +13,7 @@ if ! [[ ":$PATH:" == *":$_target:"* ]]; then echo "Your PATH is missing '$_target', consider adding it." fi cd .. -echo "fin." +if ! ls -lah "${_target}/clone-all" >/dev/null; then + echo "installation failed somehow" +fi +echo "clone-all installed to: ${_target}/clone-all"