-sudo yum -y install autoconf automake flex bison libtool pkg-config
-
-sudo yum -y install git
-
-sudo yum -y install rpm-build \
- libcap-devel xfsprogs-devel iptables-devel \
- libmemcached-devel gtk2-devel libvirt-devel
-
-# For intel-cmt-cat
-sudo yum -y install wget
+# build base system using OS specific scripts
+if [ -d "$distro_dir" ] && [ -e "$distro_dir/build_base_machine.sh" ]; then
+ sudo $distro_dir/build_base_machine.sh || ( echo "$distro_dir/build_base_machine.sh failed" && exit 1 )
+else
+ "$distro_dir is not supported"
+ exit 1
+fi