base version of pile.sh.