Skip to content

Commit

Permalink
Updated update_tools() function to allow updating snapshot.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmc committed Mar 18, 2019
1 parent ef7df7d commit ff52e05
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion docker/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,40 @@ function course {
}

function update_tools {
curl -L https://git.io/fhaLg | bash
local usage="Usage: $0 [latest|snapshot]"
local tag=latest

case "$#" in
0)
;;
1)
case "$1" in
latest|snapshot)
tag=$1
;;
*)
echo $usage >&2
return 1
;;
esac
;;
*)
echo $usage >&2
return 1
;;
esac

echo "Updating tools from $tag"

local url="https://git.io/fhaLg"
case "$tag" in
latest)
curl -L $url | bash
;;
snapshot)
curl -L $url | bash -s snapshot
;;
esac
}

alias update-tools=update_tools
Expand Down

0 comments on commit ff52e05

Please sign in to comment.