adapted brew.sh and osx.sh according to errors and needs