Skip to content

Instantly share code, notes, and snippets.

@johnpmorris
Last active June 20, 2016 07:00
Show Gist options
  • Save johnpmorris/3b4b6a6e9004a9f3231fe003d9eb0266 to your computer and use it in GitHub Desktop.
Save johnpmorris/3b4b6a6e9004a9f3231fe003d9eb0266 to your computer and use it in GitHub Desktop.
get most of our projects running smoothly with one command
function domyshit {
#bundle
echo -e "\n...does this shit have a \e[1mGemfile? \e[0mπŸ’©\n"
if [[ -a Gemfile ]]
then
echo -e "\n\e[32m...shit yeah! \e[0mπŸ’©\n"
bundle install
echo -e "\n\e[32m...done that shit \e[0mπŸ’©\n"
else
echo -e "\e[31m\n...shit no! \e[0m πŸ’©\n"
fi
# npm
echo "\n...does this shit use \e[1mnpm? \e[0mπŸ’©\n"
if [[ -a package.json ]]
then
echo -e "\n\e[32m...shit yeah! \e[0mπŸ’©\n"
npm install
echo -e "\n\e[32m...done that shit \e[0mπŸ’©\n"
else
echo -e "\e[31m\n...shit no! \e[0m πŸ’©\n"
fi
#bower
echo "\n...this shit using \e[1ma package manager to manage your package manager?\e[0mπŸ’©\n"
if [[ -a bower.json ]]
then
echo -e "\n\e[32m...shit yeah! \e[0mπŸ’©\n"
bower install
echo -e "\n\e[32m...done that shit \e[0mπŸ’©\n"
else
echo -e "\e[31m\n...shit no! \e[0m πŸ’©\n"
fi
#migrations
echo "\n...this shit got a \e[1mRakefile? \e[0mπŸ’©\n"
if [[ -a Rakefile ]]
then
echo -e "\n\e[32m...shit yeah! \e[0mπŸ’©\n"
rake db:migrate
echo -e "\n\e[32m...done that shit \e[0mπŸ’©\n"
else
echo -e "\e[31m\n...shit no! \e[0m πŸ’©\n"
fi
echo -e "\n\e[7m\e[35m... dis shit lit fam 🚬 πŸ’© πŸ’© πŸ’Ž πŸ’Ž πŸ’Ž πŸ’© 🌯 πŸ¦„ \n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment