Sha256: 35d804b088746898a503a9499f17ec59fcb53020670bf64fdb40c627e138555a

Contents?: true

Size: 563 Bytes

Versions: 8

Compression:

Stored size: 563 Bytes

Contents

#! /bin/sh

DEST=<%= @upload_url %>
RH_USERNAME=<%= @rh_username %>

if [ -z "$RH_USERNAME" ]
then
        IFS= read -rp "Enter username: " RH_USERNAME
fi

if [ -z "$RH_PASSWORD" ]
then
        IFS= read -rsp "Enter password: " RH_PASSWORD
fi

if [ -z "$FILES" ]
then
        FILES=./*.tar.gz
fi

mkdir -p done

for f in $FILES
do
  curl -k -vvv -# --fail -F "file=@$f;type=application/vnd.redhat.qpc.tar+tgz" $DEST -u "$RH_USERNAME":"$RH_PASSWORD"
  if [ $? -eq 0 ]; then
    mv $f done/
    echo "Done: $f"
  fi
done
echo "Uploaded files moved to done/ folder"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_inventory_upload-1.0.0.beta7 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta6 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta5 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta4 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta3 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta2 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-1.0.0.beta1 app/views/scripts/uploader.sh.erb
foreman_inventory_upload-0.0.1.dev1 app/views/scripts/uploader.sh.erb