Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.