BASEURL="${NEXUSPROXY}/content/repositories/fd.io."
BASEREPOID='fdio-'
-# find the files
-JARS=$(find . -type f -iname '*.jar')
-DEBS=$(find . -type f -iname '*.deb')
-
function push_file ()
{
push_file=$1
push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb
}
+
+function push_rpm ()
+{
+ rpmfile=$1
+ repoId="${BASEREPOID}yum"
+ url="${BASEURL}yum"
+ basefile=$(basename -s .rpm "$rpmfile")
+ artifactId=$(echo "$basefile" | cut -f 1 -d '_')
+ version=$(echo "$basefile" | cut -f 2- -d '_')
+ push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" rpm
+}
+
if [ ${OS} == "ubuntu1404" ]; then
+ # Find the files
+ JARS=$(find . -type f -iname '*.jar')
+ DEBS=$(find . -type f -iname '*.deb')
for i in $JARS
do
push_jar "$i"
do
push_deb "$i"
done
+elif [ ${OS} == "centos7" ]; then
+ # Find the files
+ RPMS=$(find . -type f -iname '*.rpm')
+ for i in $RPMS
+ do
+ push_rpm "$i"
+ done
fi
# vim: ts=4 sw=4 sts=4 et ft=sh :