-
Notifications
You must be signed in to change notification settings - Fork 15
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: Installer improvements and bug fixes #223
Conversation
@JeremyTubongbanua I've removed the mandatory tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"options" might be confusing for some people maybe, I've seen them called flags
From what I've seen it called in the industry: essentially a flag is a boolean option |
x86_64|amd64) ARCH="x64.";; | ||
armv7l|arm) ARCH="arm.";; | ||
riscv64) ARCH="riscv64.";; | ||
aarch64|arm64) ARCH="arm64\.";; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also consider using single quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if you're later using this in a double-quotes expression, probably best to leave as double quotes :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug fix that @cconstab found, I want to match a "." at the end of the string using grep, but grep accepts regex. So I need the "\" in the string to escape the ".".
echo $ARCH outputs "arm64\." in this case.
The one causing issues was "arm." which was matching both "arm64." and "arm."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g.
~/temp
➜ ls
arm.tgz arm64.tgz
# with the \
~/temp
➜ test_ARCH="arm\."
~/temp
➜ ls | grep $test_ARCH
arm.tgz
~/temp
➜ echo $test_ARCH
arm\.
# without the \
~/temp
➜ test_ARCH="arm."
~/temp
➜ ls | grep $test_ARCH
arm.tgz
arm64.tgz
~/temp
➜ echo $test_ARCH
arm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also consider using single quotes
See line 173
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on armvl pi works fine
- What I did
closes FileSystemException inside ~/.sshnp #203
- How I did it
- How to verify it
- Description for the changelog
fix: Installer improvements and bug fixes