I'm setting up a new machine (well actually, an Ubuntu VM) and am trying to write a script to setup a few common things that I use when doing this (Git, curl, vim + janus). 

So my script looks a bit like this:

#setup
#!/bin/sh
sudo apt-get install git
sudo apt-get install curl
...


It doesn't seem great to have 'sudo' mixed in with my command -- that is just my security-spidey-sense tingling. It seems like something like the following might also work:

sudo setup


Is there a better way to do this? What are your rules of thumb when you write scripts and need elevated permissions?


Question: What is the best way to paste code into a Trello card?
Answer: Finally found the answer here:

http://daringfireball.net/projects/markdown/syntax#code

using markdown is outdated, its not as easy as just using Gist haha, think I'll keep that route... they should really work on their tools.