Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bash errs on unary operator expected #762

Merged
merged 1 commit into from Dec 11, 2021
Merged

fix bash errs on unary operator expected #762

merged 1 commit into from Dec 11, 2021

Conversation

wyattearp
Copy link
Contributor

fix bash unary operate issue on install

Description/Motivation/Screenshots

this patch fixes an error with bash processing the install script so that it actually runs.

How Has This Been Tested?

this is related to the installation script which creates the following error on ubuntu 20.04:

~ $ bash -c "$(wget http://gef.blah.cat/sh -O -)"
--2021-12-06 23:22:48--  http://gef.blah.cat/sh
Resolving gef.blah.cat (gef.blah.cat)... 40.121.232.30
Connecting to gef.blah.cat (gef.blah.cat)|40.121.232.30|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/hugsy/gef/raw/master/scripts/gef.sh [following]
--2021-12-06 23:22:48--  https://github.com/hugsy/gef/raw/master/scripts/gef.sh
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/hugsy/gef/master/scripts/gef.sh [following]
--2021-12-06 23:22:49--  https://raw.githubusercontent.com/hugsy/gef/master/scripts/gef.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1175 (1.1K) [text/plain]
Saving to: ‘STDOUT’

-                                                    100%[=====================================================================================================================>]   1.15K  --.-KB/s    in 0s      

2021-12-06 23:22:49 (38.0 MB/s) - written to stdout [1175/1175]

bash: line 25: [: -eq: unary operator expected

testing was performed by manually executing the script from the main repository directory and verifying that gef installed at the latest revision (a .gef-*.py was present), and that gef functioned within gdb.

Checklist

  • My PR was done against the dev branch, not master.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required. -- N/A
  • My change adds tests as appropriate. -- N/A
  • I have read and agree to the CONTRIBUTING document.

@hugsy hugsy self-requested a review December 8, 2021 19:05
Copy link

@adi-g15 adi-g15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fixes this error (maybe warning :' ) both on an old ubuntu vm, and an updated arch 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants