Extract functions from install.sh
Add plank package.