diff options
Diffstat (limited to 'mirror.sh')
| -rwxr-xr-x | mirror.sh | 60 | 
1 files changed, 0 insertions, 60 deletions
diff --git a/mirror.sh b/mirror.sh deleted file mode 100755 index a31ef09..0000000 --- a/mirror.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# -# TODO: Make this work with data only. -# TODO: Restrict permissions to git from the home user. -# TODO: Work both remotely and locally. -# TODO: Ability to add / remove repositories -# TODO: Support key verification. -# TODO: Support keyrings for different projects. - -mirror_files() { -  TARGET=/mnt/hd/mirror - -  RSYNC_OPTS="\ -    --delete-excluded \ -    --hard-links \ -    --links \ -    --perms \ -    --recursive \ -    --safe-links \ -    --sparse \ -    --times \ -  " -   -  # Slackware -  mkdir --parents "$TARGET/slackware" -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware-15.0 "$TARGET/slackware/." -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware-15.0-iso "$TARGET/slackware/." -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware-current "$TARGET/slackware/." -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware64-15.0 "$TARGET/slackware/." -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware64-15.0-iso "$TARGET/slackware/." -  rsync $RSYNC_OPTS rsync://mirrors.kernel.org/slackware/slackware64-current "$TARGET/slackware/." -   -  # GNU -  mkdir --parents "$TARGET/gnu" -  rsync $RSYNC_OPTS rsync://mirror.cedia.org.ec/gnu/gnunet "$TARGET/." -  rsync $RSYNC_OPTS rsync://mirror.cedia.org.ec/gnu/taler "$TARGET/." -} - -mirror_git() { -  TARGET=/srv/git/slackcoder - -  for fp in $(find $TARGET -name 'description' | xargs grep -l 'Mirror of' | xargs -n1 dirname); do -    (cd $fp && \ -      echo $fp && \ -      git fetch origin "$(git branch --show-current)" -    ) -  done -} - -case "$1" in -'files') -   mirror_files -  ;; -'git') -   mirror_git -  ;; -*) -  echo "usage $0 files|git" -esac -  | 
