def __setup(self):
        """Construct the series of shell commands, i.e., fill in
           self.__commands"""

        # Use a tarball.  Figure out the version from the tarball name.
        if self.__tarball:
            tarball = posixpath.basename(self.__tarball)

            # Figure out the version from the tarball name
            match = re.match(r'arm-compiler-for-linux_(?P<year>\d\d)\.0?(?P<month>[0-9][0-9]?)',
                             tarball)
            if match and match.groupdict()['year'] and match.groupdict()['month']:
                self.__version = '{0}.{1}'.format(match.groupdict()['year'],
                                                  match.groupdict()['month'])
        else:
            # The download URL has the format MAJOR-MINOR in the path
            # and the tarball contains MAJOR.MINOR, so pull apart the
            # full version to get the individual components.
            match = re.match(r'(?P<major>\d+)\.(?P<minor>\d+)', self.__version)
            major_minor = '{0}-{1}'.format(match.groupdict()['major'],
                                           match.groupdict()['minor'])
            tarball = 'arm-compiler-for-linux_{0}_{1}_aarch64.tar'.format(
                self.__version, self.__package_string)
            url = '{0}/{1}/{2}/{3}'.format(self.__baseurl, major_minor,
                                           self.__url_string, tarball)

            # Download source from web
            self.__commands.append(self.download_step(url=url,
                                                      directory=self.__wd))

        # Untar package
        self.__commands.append(self.untar_step(
            tarball=posixpath.join(self.__wd, tarball), directory=self.__wd))

        # Install
        install_args = ['--install-to {}'.format(self.__prefix)]
        if self.__eula:
            install_args.append('--accept')
        if self.__microarchitectures and Version(self.__version) <= Version('20.3'):
            install_args.append('--only-install-microarchitectures={}'.format(
                ','.join(self.__microarchitectures)))
        if Version(self.__version) >= Version("21.1"):
            arch_string = ""
        else:
            arch_string = "_aarch64"
        package_directory = 'arm-compiler-for-linux_{0}_{1}{2}'.format(self.__version, self.__package_string, arch_string)
        self.__commands.append('cd {0} && ./{1} {2}'.format(
            posixpath.join(self.__wd, package_directory),
            self.__installer_template.format(self.__version),
            ' '.join(install_args)))

        # Cleanup tarball and directory
        self.__commands.append(self.cleanup_step(
            items=[posixpath.join(self.__wd, tarball),
                   posixpath.join(self.__wd, package_directory)]))

        # Set environment
        self.environment_variables['MODULEPATH'] = '{}:$MODULEPATH'.format(
            posixpath.join(self.__prefix, 'modulefiles'))
Construct the series of shell commands, i.e., fill in
           self.__commands
hpccm/building_blocks/arm_allinea_studio.py