From 802c40422fd71e27b0619e5192e08a7d77a4c8a3 Mon Sep 17 00:00:00 2001 From: Philipp Arndt Date: Mon, 9 Sep 2024 09:33:21 +0200 Subject: [PATCH] feat: show debug infos in case of error --- setup-vehub.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setup-vehub.sh b/setup-vehub.sh index 701ba18..e2a63a4 100755 --- a/setup-vehub.sh +++ b/setup-vehub.sh @@ -20,7 +20,24 @@ curl -s -L "https://vector.com$URL" \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) Chrome/115.0.5790.102' -o cli.zip echo "Extracting veHub CLI..." +set +e unzip -q cli.zip -d cli +UNZIP_STATUS=$? +set -e + +# Debugging information in case of failure +if [ $UNZIP_STATUS -ne 0 ]; then + echo "Error: Failed to unzip the cli.zip file." + # Show file size + echo "File size of cli.zip:" + stat cli.zip + + # Show hex dump of the first few bytes + echo "Hex dump of cli.zip content (first 256 bytes):" + xxd -l 256 cli.zip + + exit 1 +fi # Make the binary executable chmod +x cli/vehub