def _install_required_pkgs(self): print("Ensuring reuqired packages are installed...") time.sleep(1) # Install squashfs-tools pkgs = ['squashfs-tools', 'wget', 'genisoimage'] if self.distro in ['ubuntu', 'debian']: for pkg in pkgs: package_ensure_apt(pkg) elif self.distro in ['centos', 'fedora']: for pkg in pkgs: package_ensure_yum(pkg) else: print("ERROR: Teefaa only support ubuntu, debian, centos and fedora.") exit(1)
def _install_required_packages(self): """ Install required packages """ print("Ensuring required packages are installed...") pkgs = ['squashfs-tools', 'rsync'] if self.distro in ['ubuntu', 'debian']: for pkg in pkgs: package_ensure_apt(pkg) elif self.distro in ['centos', 'fedora']: for pkg in pkgs: package_ensure_yum(pkg) else: raise TypeError("Teefaa only supports ubuntu, debian, centos and fedora") # Create temp directory with mode_sudo(): dir_ensure(self.tmp_dir, owner=self.user, mode=700)
def cent_setup(): with cs.mode_sudo() : if not cs.package_ensure_yum('zsh',update=True) : cs.run('chsh -s /bin/zsh') if not cs.package_ensure_yum('git',update=True) : cs.run('git config --global user.name "yokotanaohiko"') cs.run('git config --global user.email [email protected]') cs.package_ensure_yum('vim-enhanced',update=True) cs.package_ensure_yum('gcc',update=True) cs.package_ensure_yum('make',update=True)
def java_install(): cs.package_ensure_yum("java-1.7.0-openjdk-devel.x86_64")
def ant_setup() : with cs.mode_sudo() : cs.package_ensure_yum('ant',update=True)