Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielkfr/6338310 to your computer and use it in GitHub Desktop.
Save gabrielkfr/6338310 to your computer and use it in GitHub Desktop.
Script bash que permite actualizar repositorios locales desde servidores remotos mediante el comando rsync.
#!/bin/bash
# Procedimiento de sincronizacion de repositorios previa verificacion de existencia de carpeta.
if [ -d /opt/opensuse/12.3/repo/update/ ]; then
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/update/12.3/ /opt/opensuse/12.3/repo/update/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64
fi
if [ -d /opt/opensuse/12.3/repo/oss/ ]; then
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/distribution/12.3/repo/oss/ /opt/opensuse/12.3/repo/oss/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64
fi
if [ -d /opt/opensuse/12.3/repo/non-oss/ ]; then
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/distribution/12.3/repo/non-oss/ /opt/opensuse/12.3/repo/non-oss/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment