Is it really true that bash has no out of the box way to pass named parameters from a parent script to a script it's calling? That seems crazy.
Right now I am adding this to any of my scripts that are called by other scripts:
Code:
# turns ** --name value ** paramaters into ** name=value **
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
v="${1/--/}"
declare $v="$2"
fi
shift
done
Beautiful language. So expressive. I have no idea what it's doing but it works.