diff --git a/arm-link b/arm-link index 844f61a16ae87a01c62a20186d20f87c378578d5..18282adbeab754400e926530b7c795053c703266 100755 --- a/arm-link +++ b/arm-link @@ -19,9 +19,6 @@ LOCKFILE=~/."${0##*/}".lock ARMBASE=/srv/ftp/archlinux/arm ARCBASE=/srv/ftp/archlinux/archive/repos -LAST=last -LASTM=month -LASTW=week [[ $1 != "" && ${1:0:1} != / ]] && { echo 'Absolute path please, ln is bugged'; exit 1; } @@ -37,12 +34,12 @@ umask 022 cd "$ARMBASE" # update last -ln -srnf "$(ls -1d "$ARCBASE"/*/*/*|sort|tail -n1)" "$LAST" - -# update last month -ln -srnf "$(date +%Y/%m/01)" "$LASTM" +ln -svrnf "$(ls -1d "$ARCBASE"/*/*/*|sort|tail -n1)" last # update last week -ln -srnf "$(date -d 'last monday' +%Y/%m/%d)" "$LASTW" +ln -srvnf "$ARCBASE/$(date -d 'last monday' +%Y/%m/%d)" week + +# update last month +ln -srvnf "$ARCBASE/$(date +%Y/%m/01)" month # vim:set sw=2 ts=2 ft=sh et: diff --git a/package-links b/package-links index 0a021914fcde03f126964db88d0e5d93683d1fc2..bb7d134321bb0a4dd2d3daa888fafdfbb173ace0 100755 --- a/package-links +++ b/package-links @@ -35,11 +35,11 @@ umask 022 # ensure dirs are here [[ -e $BASE/$PKGFLAT ]] || mkdir -p "$BASE/$PKGFLAT" -echo ":: removing dead links in ${BASE##*/}" +echo "removing dead links in ${BASE##*/}" find -L "$BASE" -type l -delete -print # create new links pass -echo ':: creating new links' +echo 'creating new links' find ${1:-$REPOS} -type f -name '*.pkg.tar.xz' -o -name '*.pkg.tar.xz.sig'| while read src; do filename="${src##*/}" pkgname="${filename%-*}" #remove arch and extension @@ -72,7 +72,7 @@ done # disallow listing of PKGFLAT. Too much file echo 'No listing allowed here.' > "$BASE/$PKGFLAT/index.html" -echo ":: removing empty directories in ${BASE##*/}" +echo "removing empty directories in ${BASE##*/}" find "$BASE" -type d -empty -delete -print touch "$BASE" "$BASE/$PKGFLAT" diff --git a/repo-rsync b/repo-rsync index 8da68fe8e28c8bc56e363e874cad3fcd84409139..6825f28cd191a6314f4bbd77af52726439b1fb4c 100755 --- a/repo-rsync +++ b/repo-rsync @@ -35,6 +35,11 @@ umask 022 # ensure destination exists [[ -d $SNAP ]] || mkdir -p "$SNAP" +# display info +echo starting rsync +echo snapshot is: $SNAP +echo last is: $LAST + # Rsync from master using last sync # We must use absolute path with --link-dest to avoid errors rsync -rltH --link-dest="$LAST/" --exclude '*/.*' "$UPSTREAM" "$SNAP/"