Commit 9c94b7fe authored by Seblu's avatar Seblu
Browse files

Remove AUR code

Since AUR4, rsync access has been deprecated
parent 9d8b8ecf
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -39,13 +39,3 @@ REPO_PACKAGES_FULL_SEARCH=0

# Enable ISO archiving
ARCHIVE_ISO=1

##############################################################################
#### AUR
##############################################################################

# Enale AUR archiving
ARCHIVE_AUR=0

# AUR Rsync Tree
AUR_RSYNC='rsync://aur.archlinux.org/unsupported/'
+0 −33
Original line number Diff line number Diff line
@@ -188,37 +188,6 @@ iso_rsync() {
		error "Unable to rsync: $ISO_RSYNC"
}

# archive snapshot of aur tree
aur_rsync() {
	msg "Snapshoting AUR"

	local AUR_DIR="$ARCHIVE_DIR/aur"
	local SNAPR="$(date +%Y/%m/%d)"
	local SNAP="$AUR_DIR/$SNAPR"

	# ensure destination exists
	[[ -d "$SNAP" ]] || mkdir -p "$SNAP"

	# compute last but today
	local LAST="$(ls -1d "$AUR_DIR"/2???/*/*|sort|grep -v $SNAPR|tail -n1)"

	# display transfert info
	msg2 "snapshot to: $SNAP"
	msg2 "last path: $LAST"

	[[ -n "$LAST" ]] && local LINKDEST="--link-dest=$LAST/"

	msg2 'Rsyncing...'

	# Rsync from master using last sync
	# We must use absolute path with --link-dest to avoid errors
	rsync  -rltH $LINKDEST --exclude '*/.*' "$AUR_RSYNC" "$SNAP/" ||
		error "Unable to rsync: $AUR_RSYNC"

	# only to have a quick check of sync in listdir
	touch "$SNAP"
}

main() {
	# running this as root, is a bad idea.
	(( $UID == 0 )) && echo 'You should not run me as root!'
@@ -250,8 +219,6 @@ main() {

	(( $ARCHIVE_ISO)) && iso_rsync

	(( $ARCHIVE_AUR)) && aur_rsync

	return 0
}