added a build shell script
fixed build script and made corresponding changes to wayback script