Skip to content

Instantly share code, notes, and snippets.

@jay16
Forked from wusuopu/mkgitignore
Last active August 29, 2015 14:21
Show Gist options
  • Save jay16/b814ce670dee0398ca09 to your computer and use it in GitHub Desktop.
Save jay16/b814ce670dee0398ca09 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $@ != "" ]]; then
if [[ $2 != "" ]]; then
curl http://www.gitignore.io/api/$1 -o $2
else
curl http://www.gitignore.io/api/$1
fi
else
echo 创建gitignore文件
echo
echo Usage: mkgitignore lang
echo Example: mkgitignore vim,python
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment