diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-12-27 12:33:35 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-12-27 12:42:12 +0100 |
commit | 332d0f61e49a5aa1a127ee692d06d10b0cba1f44 (patch) | |
tree | b82982231a60bf4573fae46fefa0a8619abd85e1 /scripts/uploadbuckets.sh | |
parent | 9ed559eb3377b010df9915ef85dd40d6b5fdf803 (diff) | |
download | aurweb-332d0f61e49a5aa1a127ee692d06d10b0cba1f44.tar.xz |
Remove legacy scripts
These are no longer needed. We use Git repositories now.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts/uploadbuckets.sh')
-rwxr-xr-x | scripts/uploadbuckets.sh | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/scripts/uploadbuckets.sh b/scripts/uploadbuckets.sh deleted file mode 100755 index 3252692..0000000 --- a/scripts/uploadbuckets.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -DRYRUN=${DRYRUN:-1} - -source="$1" -dest="$2" - -if [[ -z $source || -z $dest ]]; then - echo 'usage: uploadbuckets.sh <source> <dest>' - echo 'Script runs in DRYRUN mode by default.' - echo 'To run for real, set DRYRUN=0 in your environment.' - exit 1 -fi - -if [[ ! -d $source ]]; then - echo 'error: source is not a directory' - exit 1 -fi - -if [[ -e $dest && ! -d $dest ]]; then - echo 'error: dest is not a directory' - exit 1 -fi - -if [[ $(readlink -e $dest) = $(readlink -e $source) ]]; then - echo 'error: source and dest cannot be the same. Rotate the result' - echo 'into place once the migration is complete.' - exit 1 -fi - -if [[ ! -d $dest ]]; then - mkdir $dest -fi - -shopt -s nullglob - -for package in "$source"/*; do - pkgname="${package##*/}" - newfolder="$dest/${pkgname:0:2}" - if [[ ! -d "$newfolder" ]]; then - if [[ $DRYRUN -gt 0 ]]; then - echo mkdir -p "$newfolder" - else - mkdir -p "$newfolder" - fi - fi - if [[ $DRYRUN -gt 0 ]]; then - echo mv "$source/$pkgname" "$newfolder/$pkgname" - else - mv "$source/$pkgname" "$newfolder/$pkgname" - fi -done - -if [[ $DRYRUN -gt 0 ]]; then - echo - echo 'DRYRUN mode was enabled.' - echo 'To run for real, set DRYRUN=0 in your environment.' -fi |