From 332d0f61e49a5aa1a127ee692d06d10b0cba1f44 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 27 Dec 2014 12:33:35 +0100 Subject: Remove legacy scripts These are no longer needed. We use Git repositories now. Signed-off-by: Lukas Fleischer --- scripts/cleanup | 46 -------------------------------------- scripts/uploadbuckets.sh | 58 ------------------------------------------------ 2 files changed, 104 deletions(-) delete mode 100755 scripts/cleanup delete mode 100755 scripts/uploadbuckets.sh (limited to 'scripts') diff --git a/scripts/cleanup b/scripts/cleanup deleted file mode 100755 index 0ccbe7d..0000000 --- a/scripts/cleanup +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/php - ' - 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 -- cgit v1.2.3-70-g09d2