aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-10-20 01:57:49 -0700
committerRobert Yang <liezhi.yang@windriver.com>2015-10-20 02:20:04 -0700
commitb6a5e9973afe805490f6aee8967026bc47f2692b (patch)
tree5524bf0c844038b08e77a8592527214d84067bdc
parentd3616a95e536ad691d3a6ee432d15fa28d6d7b4a (diff)
downloadopenembedded-core-contrib-rbt/prserv.tar.gz
openembedded-core-contrib-rbt/prserv.tar.bz2
openembedded-core-contrib-rbt/prserv.zip
bitbake-prserv-tool: check file namerbt/prserv
Fixed: $ bitbake-prserv-tool import /tmp/1 File "/path/to/lib/bb/parse/__init__.py", line 114, in handle(fn='/tmp/1', data=<bb.data_smart.DataSmart object at 0x2369bd0>, include=True): return h['handle'](fn, data, include) > raise ParseError("not a BitBake file", fn) ParseError: ParseError in /tmp/1: not a BitBake file But 1.conf works well, its help also shows "<file.conf>", so check the filename and print proper error message. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rwxr-xr-xscripts/bitbake-prserv-tool9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
index 28c2416bfe..dcfd7f2733 100755
--- a/scripts/bitbake-prserv-tool
+++ b/scripts/bitbake-prserv-tool
@@ -86,6 +86,15 @@ do_migrate_localcount ()
[ $# -eq 0 ] && help && exit 1
+case $2 in
+*.conf)
+ ;;
+*)
+ echo ERROR: $2 must end with .conf!
+ exit 1
+ ;;
+esac
+
case $1 in
export)
do_export $2