Welcome the slackmirror.sh web page

slackmirror.sh is a simple bash script written by Doug Le Tough.

This script will :

  • Automatically mirror the choosen version of a slackware hierarchy tree on to you computer using rsync.
  • Requirements :
    This script should run with any standard Slackware installation and you will need these softwares installed :

  • rsync
  • Installation instructions :

  • Copy and paste to your favorite text editor the following source code
  • Save it where it suits you (ie. /usr/local/bin/slackmirror.sh)
  • As root user, make it executable with this command line : chmod +x /usr/local/bin/slackmirror.sh
  • Browse the source code and define the following variables to suit your needs :
  • That's all folks
  • Usage :
     
    The slackmirror.sh script need some mandatory arguments to run properly :

  • The slackmirror.sh script allow you to synchronize with the 32 bits and the 64 bits Slackware tree :
  • You can synchronize both 32 bits and 64 bits slackware tree under the same directory (LOCAL_REP) without any problem.
  •  

    This script is released under the WTFPL 2.0 and you can send me an email for :

  • Bug reports
  • Suggestions
  • Insults
  • Whatever reasons you want

  •  
    to : doug.letough<at>free.fr (replace <at> by a valid @)

    #!/bin/sh
    
    VERSION=14.0
    REMOTE_URL=rsync://rsync.slackware.no/slackware
    LOCAL_REP=/slackware
    UUID=$(id -u)
    UGID=$(id -g)
    
    case $# in
    1)
      case $1 in
      -32)
        SLACK=slackware-$VERSION
        ;;
      -64)
        SLACK=slackware64-$VERSION
        ;;
      *)
        echo -e "Usage:\n\t$0 <-32 | -64>"
        exit 0
        ;;
      esac
      
      if [ -d $LOCAL_REP ]
      then
        clear
        rsync --delete --exclude="source/*" -avrz $REMOTE_URL/$SLACK $LOCAL_REP
        chown -R $UUID:$UGID $LOCAL_REP
      else
        echo -e "$LOCAL_REP does not exist.\n Should I create it ?"
        read A
        case $A in
        y|Y)
          mkdir -pv $LOCAL_REP
          $0 $1
          ;;
        *)
          exit 0
          ;;
        esac
      fi
      ;;
    *)
      echo -e "Usage:\n\t$0 <-32 | -64>"
      ;;
    esac