Skip to content

Instantly share code, notes, and snippets.

@juliandunn
Created August 5, 2014 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandunn/85464e6334345e80bad7 to your computer and use it in GitHub Desktop.
Save juliandunn/85464e6334345e80bad7 to your computer and use it in GitHub Desktop.
Initial revision of shell script to get thee an Omnibus on AIX
#!/bin/sh
# Nuke and pave all the freeware RPMs
rpm -qa | sed -e 's/\-[AIX Servers^\-]*\-[AIX Servers^\-]*$//' | egrep -v '(AIX-rpm|zlib|gettext)' | xargs rpm -e
# Get all deps for wget
perl -e 'use LWP::Simple; getprint($ARGV[0]);' ftp://www.oss4aix.org/rpmdb/deplists/aix61/wget-1.15-1.aix5.1.ppc.deps > /tmp/wget-1.15-1.aix5.1.ppc.deps
while read i; do
perl -e 'use LWP::Simple; getprint($ARGV[0]);' ftp://www.oss4aix.org/everything/RPMS/${i} > /tmp/${i}
done < /tmp/wget-1.15-1.aix5.1.ppc.deps
# Don't trash these RPMs, otherwise the AIX-rpm package will get destroyed
rm -f /tmp/zlib*.rpm /tmp/gettext*.rpm
# Now we get wget
perl -e 'use LWP::Simple; getprint($ARGV[0]);' ftp://www.oss4aix.org/RPMS/wget/wget-1.15-1.aix5.1.ppc.rpm > /tmp/wget-1.15-1.aix5.1.ppc.rpm
rpm -ivh /tmp/*.rpm
# TODO: Now that we have wget, go properly retrieve the other parts of the
# toolchain
# TODO: Can we just use the Ruby 2.0.0 RPM from perzl.org?
# TODO: There are different deps files for AIX 7.1! This script is just for 6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment