diff --git a/old/.dockerignore b/old/.dockerignore deleted file mode 100644 index 89f47bd..0000000 --- a/old/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -creator/* diff --git a/old/Makefile b/old/Makefile deleted file mode 100644 index 59002f5..0000000 --- a/old/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -default: cloner - -GLOBALVOL ?= cloner-global -TAGOWNER = valicek1 -TAGMAIN = repo-cloner -TAGBASE= $(TAGOWNER)/$(TAGMAIN) - -cloner: - docker build -t $(TAGBASE) . - -run: cloner - docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) - -once: cloner - docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/cron-command - -bash: cloner - docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /bin/bash - -# wizzard -wizzard: cloner - docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /usr/local/bin/wizzard - -singleshot: cloner - docker run -v $(GLOBALVOL):/data -e BASE=/data/cloner-t456 --user executor -it --rm $(TAGBASE) run-checker - - diff --git a/old/dockerbin/cron-command b/old/dockerbin/cron-command deleted file mode 100755 index 6a7ca18..0000000 --- a/old/dockerbin/cron-command +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -euo pipefail -IFS=$'\n\t' - -# try to include laminar env -if [ -f /etc/profile.d/laminar.sh ] -then - source /etc/profile.d/laminar.sh -fi - -# if started as root -if [ $UID -eq 0 ] -then - find /data \! -user executor -exec chown executor:executor {} \; - su executor -c cron-command - exit $? -fi -# check lock -lock=/var/run/cloner.pid - -dir_prefix=cloner - -max_jobs=${JOBS:-3} - -function die(){ - echo $@ 1>&2 - exit 1 -} - -# first, check process -if [ -f $lock ] -then - pid=$(cat $lock) - # if it still runs, die not so quietly - [ -n "$pid" ] && [ -d /proc/$pid ] && die "Another process running!" -fi -# else make some mess and setup trap -echo $BASHPID > $lock - -find /data -maxdepth 1 -type d -name "${dir_prefix}-*" | \ - parallel --lb -j $max_jobs -n 1 run-mirror-update - -echo "Cron Finished" - diff --git a/old/dockerbin/run-mirror-update b/old/dockerbin/run-mirror-update deleted file mode 100755 index c264950..0000000 --- a/old/dockerbin/run-mirror-update +++ /dev/null @@ -1,35 +0,0 @@ -i#!/bin/bash -set -euo pipefail -IFS=$'\n\t' - -function log(){ - local title=${raw:-$name} - [ -z "$title" ] || title=" [$title]" - echo "[$(date +"%X")]$title $@" -} - -function die(){ - log "$@" 1>&2 - exit 1 -} - - -scratch=$(mktemp -d -t tmp.XXXXXXXXXX) -function finish { - rm -rf "$scratch" -} -trap finish EXIT - - -# necessary checks -pathto=${1:-} -[ -n "$pathto" ] || die "No project specified" - -raw=$(basename $pathto | sed 's/^cloner-//g') - -# is it enabled? -[ -f "$pathto/.enabled" ] || die "$raw not enabled!" - - -env BASE=$pathto run-checker | while read line; do log "$line"; done -