Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Created April 16, 2013 08:35
Show Gist options
  • Save robinsmidsrod/5394363 to your computer and use it in GitHub Desktop.
Save robinsmidsrod/5394363 to your computer and use it in GitHub Desktop.
Simple script to fetch and unpack the latest SmartOS platform in the current directory
#!/bin/bash
wget -c -N 'https://download.joyent.com/pub/iso/md5sums.txt' \
'https://download.joyent.com/pub/iso/platform-latest.tgz' && \
grep platform-latest.tgz md5sums.txt | perl -lane 'print "$F[0] $F[1]"' | md5sum -c - && \
tar xzvf platform-latest.tgz --no-same-owner && \
ln -snf $(ls -1d platform-* | grep -v 'platform-latest.tgz' | tail -n1) platform && \
echo ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment