+results_dir="$WORKSPACE/work/results"
+repo_name=`echo $WORKSPACE | awk -F '/' '{print $4}' | cut -d '-' -f2- | sed 's|\(.*\)-.*|\1|'`
+
+#Creating dir to move duplicate RPMs/SRPMs to avoid re-upload
+mkdir "$results_dir/repo/duplicates"
+mkdir "$results_dir/src_repo/duplicates"
+
+#List all RPMs available in Nexus and move the duplicates
+for artifact in \
+ `ls $results_dir/repo`
+ do
+ if curl --head --fail $nexus_repo_url/$release_path/rpms/x86_64/$artifact
+ then
+ mv $results_dir/repo/$artifact $results_dir/repo/duplicates/
+ fi
+ done
+
+#List all SRPMs available in Nexus and move the duplicates
+for artifact in \
+ `ls $results_dir/src_repo`
+ do
+ if curl --head --fail $nexus_repo_url/$release_path/rpms/Sources/$artifact
+ then
+ mv $results_dir/src_repo/$artifact $results_dir/src_repo/duplicates/
+ fi
+ done