Skip to content

Instantly share code, notes, and snippets.

@andrefigueira
Created December 13, 2017 16:09
Show Gist options
  • Save andrefigueira/6286bcb285c1a5f74983e7b79e0b04a4 to your computer and use it in GitHub Desktop.
Save andrefigueira/6286bcb285c1a5f74983e7b79e0b04a4 to your computer and use it in GitHub Desktop.
update-linux-postman.sh
update-postman () {
echo "Updating postman to latest version"
dir=$(pwd)
cd /tmp
echo "Downloading latest version"
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
echo "Extracting postman"
sudo tar -xzf postman.tar.gz -C /opt
echo "Removing tmp file"
rm postman.tar.gz
echo "Unlinking old release"
sudo unlink /usr/bin/postman
echo "Linking new postman release"
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cd $dir
echo "Finished updating postman!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment