Loading arm-link +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ LOCKFILE=~/."${0##*/}".lock ARMBASE=/srv/ftp/archlinux/arm PREFIX=packages LASTM=month LASTW=week [[ $1 != "" && ${1:0:1} != / ]] && { echo 'Absolute path please'; exit 1; } Loading @@ -31,6 +33,12 @@ umask 022 cd "$ARMBASE" # update last month ln -snf "$(date +%Y/%m/01)" "$LASTM" # update last week ln -snf "$(date -d 'last monday' +%Y/%m/%d)" "$LASTW" # clean dead links pass echo ':: clening dead links' [[ -d "$PREFIX" ]] && find -L "$PREFIX" -type l -delete -print Loading arm-sync +0 −7 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ ARMBASE=/srv/ftp/archlinux/arm SNAPR="$(date +%Y/%m/%d)" SNAP="$ARMBASE/$SNAPR" LAST="$ARMBASE/last" LASTM="$ARMBASE/month" LASTW="$ARMBASE/week" # we lock! exec 9> "$LOCKFILE" Loading @@ -47,11 +45,6 @@ touch "$SNAP" # update last ln -snf "$SNAPR" "$LAST" # update last month ln -snf "$(date +%Y/%m/01)" "$LASTM" # update last week ln -snf "$(date -d 'last monday' +%Y/%m/%d)" "$LASTW" # use hardlink (in case of error) #if type -p hardlink &>/dev/null; then Loading Loading
arm-link +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ LOCKFILE=~/."${0##*/}".lock ARMBASE=/srv/ftp/archlinux/arm PREFIX=packages LASTM=month LASTW=week [[ $1 != "" && ${1:0:1} != / ]] && { echo 'Absolute path please'; exit 1; } Loading @@ -31,6 +33,12 @@ umask 022 cd "$ARMBASE" # update last month ln -snf "$(date +%Y/%m/01)" "$LASTM" # update last week ln -snf "$(date -d 'last monday' +%Y/%m/%d)" "$LASTW" # clean dead links pass echo ':: clening dead links' [[ -d "$PREFIX" ]] && find -L "$PREFIX" -type l -delete -print Loading
arm-sync +0 −7 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ ARMBASE=/srv/ftp/archlinux/arm SNAPR="$(date +%Y/%m/%d)" SNAP="$ARMBASE/$SNAPR" LAST="$ARMBASE/last" LASTM="$ARMBASE/month" LASTW="$ARMBASE/week" # we lock! exec 9> "$LOCKFILE" Loading @@ -47,11 +45,6 @@ touch "$SNAP" # update last ln -snf "$SNAPR" "$LAST" # update last month ln -snf "$(date +%Y/%m/01)" "$LASTM" # update last week ln -snf "$(date -d 'last monday' +%Y/%m/%d)" "$LASTW" # use hardlink (in case of error) #if type -p hardlink &>/dev/null; then Loading