sleep 10
if [ -f /usr/bin/zypper ]; then
- echo "Since zypper exists, us it to install facter"
- zypper -n install facter
+ FACTER_OS="openSUSE"
+else
+ FACTER_OS=$(/usr/bin/facter operatingsystem)
fi
-FACTER_OS=$(/usr/bin/facter operatingsystem)
if [ -f ~/.packagecloud ]; then
case "$FACTER_OS" in
Ubuntu)
RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS}
;;
- OpenSuSE)
- FACTER_OSREL=$(/usr/bin/facter operatingsystemrelease)
- RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
- package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${FACTER_OSREL}/" ${RPMS}
+ openSUSE)
+ # Use /etc/os-release on openSUSE to get $VERSION
+ . /etc/os-release
+ RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm' | grep -v 'vpp-ext-deps')
+ VPP_EXT_RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm' | grep 'vpp-ext-deps')
+ package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${VERSION}/" ${RPMS}
+ # This file may have already been uploaded. Don't error out if it exists.
+ package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${VERSION}/" ${VPP_EXT_RPMS} --skip-errors
;;
esac
fi