x86, build: replace Perl script with Shell script