bash - Getting `make install` to source your bash_completion -
this install part of makefile:
install: e in $(exec); \ sudo cp --remove-destination ${curdir}/$$e /usr/local/bin; done sudo cp ${curdir}/bin/stage2.d /etc/bash_completion.d/stage2 . /etc/bash_completion
where "stage2" name of executable.
the last line provides issue. after adding file bash_completion.d
directory want source
bash_completion
. calling source
or .
yields:
. /etc/bash_completion /etc/bash_completion: 32: [[: not found /etc/bash_completion: 38: [[: not found /etc/bash_completion: 50: bad substitution make: *** [install] error 2
make uses /bin/sh
default. have force use bash since [[
not supported normal sh
.
gnu make lets set shell
variable [in makefile] force use bash. need add line
shell=/bin/bash
at top of makefile
Comments
Post a Comment