Commit 3e6f395c authored by Seblu's avatar Seblu

Be more verbose

Usefull in service output
parent 23097747
......@@ -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:
......@@ -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"
......
......@@ -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/"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment