Slackware 13.37 com multlib

Este é um simples script que automatiza a instalação do Multilib Slackware para X86_64.

 

  #!/bin/bash
  # Noilson Caio Teixeira de Araújo - caiogore[at]gmail[dot]com
  # Script de instalação do multilib no slackware 13.37.0
  #
  # 
  binwget=$(which wget)
  binlftp=$(which lftp)
  binawk=$(which awk)
  binupgradepkg=$(which upgradepkg)
  version=/etc/slackware-version
  wgetopt="-q --delete-after -T 5 -t 1"
  url="http://connie.slackware.com/~alien/multilib/"
  #
  # Test access to $url
  #
  $binwget $wgetopt $url
  retorno="$?"
  if [ "$retorno" != 0 ]
  then
          echo "$url - [not found]"
          exit 1
  fi
  #
  # test distribution
  #
  if [ -z "$version" ]
  then
  	echo "No Slackware"
  fi
  #
  # teste slackware version
  #
  slackwareversion=$($binawk '{print $2}' "$version")
  if [ "$slackwareversion" != "13.37.0" ]
  then
  	echo "Only for Slackware 13.37.0 version"
  	exit 1
  fi
  #
  # test ftp connection
  #
  clear
  $binlftp -c "open $url ; mirror 13.37"
  retornolftp="$?"
  if [ "$retornolftp" != 0 ]
  then
          echo "[ Download failed ]"
          exit 1
  fi
  #
  # yes to unpack files
  #
  echo "install packages? (y / n)"
  read retornoinst
  if [ "$retornoinst" = "y" ]
  then
  	$binupgradepkg --reinstall --install-new 13.37/*.t?z
  	$binupgradepkg --install-new 13.37/slackware64-compat32/*-compat32/*.t?z
  fi
Advertisements

3 thoughts on “Slackware 13.37 com multlib

  1. Pingback: Script para instalação da multilib no Slackware 64Bits | RODRIGO LIRA

  2. Pingback: Script para instalação do multilib no Slackware 64Bits | Rodrigo Lira

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s