Closed dylanaraps closed 5 years ago
I forgot to create a new branch. My bad.
Second commit fixes re-directions of stdout
and stderr
to /dev/null
as well as trailing white-space.
2>1
is a file redirection.&>/dev/null
is a bash-ism.Will send more commits later.
You can use type
to check if a command exists. It's a shell builtin and you can avoid the subshell.
I've replaced the basename = basename
test with ${var##*/} = ${var2##*/}
. This avoids two subshells and two external calls to basename
.
Question:
Can the eval call be removed here?:
eval "$command 115200,38400,9600 tty${index} linux"
Would "$command" "115200,38400,9600" "tty${index}" "linux"
not work?
There was a reason I used eval, but honestly I don’t even remember why it’s been so long. So natural selection dictates eval be killed off.
All ready to merge?
:+1:
This allows package managers (
xbps-src
,makepkg
,puke
) to installhummingbird
to a "fake" root. It also allows for installing to a chroot.Example:
The result is
~/.chroot/usr/bin/hummingbird
etc.