Fix a bug in the script caused by bag syntax.
Add a lightweight, more flexible installation script.