#!/bin/sh PLATFORM="${PLATFORM:-`platform.sh`}" MACHINE="$HOST" if [ "$PLATFORM" = "osx" ]; then MACHINE="$(scutil --get ComputerName)" elif [ "$PLATFORM" = "linux" ]; then MACHINE="$(cat /proc/sys/kernel/hostname)" fi echo $MACHINE | awk -F\. '{print $1}' \ | tr '[:upper:]' '[:lower:]' \ | tr ' ' '-'