Skip to content

Instantly share code, notes, and snippets.

@wolever
Created March 14, 2014 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wolever/9556163 to your computer and use it in GitHub Desktop.
Save wolever/9556163 to your computer and use it in GitHub Desktop.
Small shell function to create Python packages
mkpkg() {
if [[ -z "$1" ]]; then
echo "mkpkg: $0 PKG_DIR"
return 1
fi
if [[ ! -d "$1" ]]; then
mkdir "$1" || return $?
fi
touch "$1/__init__.py"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment