Skip to content

Instantly share code, notes, and snippets.

@miharp
Last active August 29, 2015 14:02
Show Gist options
  • Save miharp/9205f96cc828ff324a69 to your computer and use it in GitHub Desktop.
Save miharp/9205f96cc828ff324a69 to your computer and use it in GitHub Desktop.
HDP-2.1.2.2
#!/bin/bash
#Get RPMs
hdpDir='HDP/suse11/2.x/updates/2.1.2.0/'
mkdir -p $hdpDir
/usr/local/src/s3cmd-master/s3cmd sync --exclude '*.tar.gz' --exclude '*.src.rpm' s3://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.1.2.0/ $hdpDir
rm -f HDP/suse11/2.x/updates/2.1.2.0/hbase/*
rm -f HDP/suse11/2.x/updates/2.1.2.0/hive/*
/usr/local/src/s3cmd-master/s3cmd sync --exclude '*.tar.gz' --exclude '*.src.rpm' s3://TD-dev.hortonworks.com/HDP-2.1.2.2/suse11/hbase/ HDP/suse11/2.x/updates/2.1.2.0/hbase/
/usr/local/src/s3cmd-master/s3cmd sync --exclude '*.tar.gz' --exclude '*.src.rpm' s3://TD-dev.hortonworks.com/HDP-2.1.2.2/suse11/hive/ HDP/suse11/2.x/updates/2.1.2.0/hive/
createrepo $hdpDir
tar zcf HDP-2.1.2.2-suse11-rpm.tar.gz HDP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment