-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from SummerLife/master
[update] env upgrade
- Loading branch information
Showing
5 changed files
with
567 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# .gitattributes for Env Project. | ||
|
||
# Handle line endings automatically for files detected as text | ||
# and leave all files detected as binary untouched. | ||
# ============ | ||
* text=auto | ||
|
||
# Source files | ||
# ============ | ||
*.pxd text eol=crlf diff=python | ||
*.py text eol=crlf diff=python | ||
*.py3 text eol=crlf diff=python | ||
*.pyw text eol=crlf diff=python | ||
*.pyx text eol=crlf diff=python | ||
*.pyz text eol=crlf diff=python | ||
*.pyi text eol=crlf diff=python | ||
|
||
# Binary files | ||
# ============ | ||
*.db binary | ||
*.p binary | ||
*.pkl binary | ||
*.pickle binary | ||
*.pyc binary | ||
*.pyd binary | ||
*.pyo binary | ||
|
||
# MarkDown | ||
*.md text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
# -*- coding:utf-8 -*- | ||
# | ||
# File : cmd_system.py | ||
# This file is part of RT-Thread RTOS | ||
# COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Change Logs: | ||
# Date Author Notes | ||
# 2018-5-28 SummerGift Add copyright information | ||
# | ||
|
||
import os | ||
from vars import Import | ||
|
||
'''RT-Thread environment package system''' | ||
|
||
|
||
def cmd(args): | ||
packages_root = os.path.join(Import('env_root'), 'packages') | ||
|
||
if args.system_update: | ||
dir_list = os.listdir(packages_root) | ||
|
||
with open(os.path.join(packages_root, 'Kconfig'), 'w') as kconfig: | ||
for item in dir_list: | ||
if os.path.isfile(os.path.join(packages_root, item, 'Kconfig')): | ||
kconfig.write('source "$PKGS_DIR/' + item + '/Kconfig"') | ||
kconfig.write('\n') | ||
|
||
|
||
def add_parser(sub): | ||
parser = sub.add_parser('system', help=__doc__, description=__doc__) | ||
|
||
parser.add_argument('--update', | ||
help='update system menuconfig\'s online package options ', | ||
action='store_true', | ||
default=False, | ||
dest='system_update') | ||
|
||
parser.set_defaults(func=cmd) | ||
# -*- coding:utf-8 -*- | ||
# | ||
# File : cmd_system.py | ||
# This file is part of RT-Thread RTOS | ||
# COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Change Logs: | ||
# Date Author Notes | ||
# 2018-5-28 SummerGift Add copyright information | ||
# | ||
|
||
import os | ||
from vars import Import | ||
|
||
'''RT-Thread environment package system''' | ||
|
||
|
||
def cmd(args): | ||
packages_root = os.path.join(Import('env_root'), 'packages') | ||
|
||
if args.system_update: | ||
dir_list = os.listdir(packages_root) | ||
|
||
with open(os.path.join(packages_root, 'Kconfig'), 'w') as kconfig: | ||
for item in dir_list: | ||
if os.path.isfile(os.path.join(packages_root, item, 'Kconfig')): | ||
kconfig.write('source "$PKGS_DIR/' + item + '/Kconfig"') | ||
kconfig.write('\n') | ||
|
||
|
||
def add_parser(sub): | ||
parser = sub.add_parser('system', help=__doc__, description=__doc__) | ||
|
||
parser.add_argument('--update', | ||
help='update system menuconfig\'s online package options ', | ||
action='store_true', | ||
default=False, | ||
dest='system_update') | ||
|
||
parser.set_defaults(func=cmd) |
Oops, something went wrong.