@@ -17,58 +17,58 @@ function main {
1717
1818 echo " Downloading gon from: $download_url "
1919 if ! curl -L -o gon.zip " $download_url " ; then
20- echo " ERROR: Failed to download gon from $download_url "
20+ echo " ERROR: Failed to download gon from $download_url " >&2
2121 rm -f gon.zip
2222 exit 1
2323 fi
2424
2525 # Extract to specific target
2626 echo " Extracting gon binary..."
2727 if ! unzip -o gon.zip -d . gon; then
28- echo " ERROR: Failed to extract gon from gon.zip"
28+ echo " ERROR: Failed to extract gon from gon.zip" >&2
2929 rm -f gon.zip
3030 exit 1
3131 fi
3232
3333 # Verify extracted binary exists and is a regular file
3434 if [[ ! -f ./gon ]]; then
35- echo " ERROR: Expected file './gon' not found after extraction"
35+ echo " ERROR: Expected file './gon' not found after extraction" >&2
3636 rm -f gon.zip
3737 exit 1
3838 fi
3939
4040 # Make executable
4141 echo " Setting executable permissions..."
4242 if ! chmod +x ./gon; then
43- echo " ERROR: Failed to set executable permissions on ./gon"
43+ echo " ERROR: Failed to set executable permissions on ./gon" >&2
4444 rm -f gon.zip ./gon
4545 exit 1
4646 fi
4747
4848 # Verify it's executable
4949 if [[ ! -x ./gon ]]; then
50- echo " ERROR: File ./gon is not executable after chmod"
50+ echo " ERROR: File ./gon is not executable after chmod" >&2
5151 rm -f gon.zip ./gon
5252 exit 1
5353 fi
5454
5555 # Move to system path
5656 echo " Moving gon to /usr/local/bin/"
5757 if ! sudo mv ./gon /usr/local/bin/gon; then
58- echo " ERROR: Failed to move gon to /usr/local/bin/"
58+ echo " ERROR: Failed to move gon to /usr/local/bin/" >&2
5959 rm -f gon.zip ./gon
6060 exit 1
6161 fi
6262
6363 if ! sudo chmod +x /usr/local/bin/gon; then
64- echo " ERROR: Failed to set executable permissions on /usr/local/bin/gon"
64+ echo " ERROR: Failed to set executable permissions on /usr/local/bin/gon" >&2
6565 exit 1
6666 fi
6767
6868 # Verify installation
6969 echo " Verifying gon installation..."
7070 if ! gon --version; then
71- echo " ERROR: gon --version failed after installation"
71+ echo " ERROR: gon --version failed after installation" >&2
7272 exit 1
7373 fi
7474
0 commit comments