sdn-install: improve macOS installation
Login shells have a dash at the beginning of their first argument.
This commit is contained in:
parent
c9b003735d
commit
a85426541a
@ -125,7 +125,7 @@ done
|
|||||||
|
|
||||||
# Figure out the shell to integrate with
|
# Figure out the shell to integrate with
|
||||||
login=$(basename "$SHELL")
|
login=$(basename "$SHELL")
|
||||||
actual=$(ps -p $$ -o ppid= | xargs ps -o comm= -p)
|
actual=$(ps -p $$ -o ppid= | xargs ps -o comm= -p | sed 's/^-//')
|
||||||
if [ -z "$shell" ]
|
if [ -z "$shell" ]
|
||||||
then
|
then
|
||||||
if [ "$login" != "$actual" ]
|
if [ "$login" != "$actual" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user