generate_scripts

echo "#!/usr/bin/env python" >$1
echo "#-*- encoding=UTF-8 -*-" >>$1
echo "from __future__ import print_function" >>$1
echo "import click" >>$1
echo "" >>$1
echo "" >>$1
echo "@click.command()" >>$1
echo "#@click.argument()" >>$1
echo "" >>$1
echo "def ${1:0:-3}():">>$1
echo "" >>$1
echo "" >>$1
echo "" >>$1
echo "" >>$1
echo "" >>$1
echo "" >>$1
echo "if __name__ == '__main__':">>$1
echo " ${1:0:-3}()">>$1
chmod 775 $1

posted @ 2017-02-09 15:29  xiaojikuaipao  阅读(230)  评论(0编辑  收藏  举报