Improve p2-ide.sh script