Loading arm-link +5 −8 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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: package-links +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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" Loading repo-rsync +5 −0 Original line number Diff line number Diff line Loading @@ -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/" Loading Loading
arm-link +5 −8 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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:
package-links +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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" Loading
repo-rsync +5 −0 Original line number Diff line number Diff line Loading @@ -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/" Loading