diff options
Diffstat (limited to 'scripts/bitbake-prserv-tool')
| -rwxr-xr-x | scripts/bitbake-prserv-tool | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool index 4654e6d421..fa31b52584 100755 --- a/scripts/bitbake-prserv-tool +++ b/scripts/bitbake-prserv-tool @@ -5,8 +5,8 @@ help () base=`basename $0` echo -e "Usage: $base command" echo "Avaliable commands:" - echo -e "\texport <file>: export and lock down the AUTOPR values from the PR service into a file for release." - echo -e "\timport <file>: import the AUTOPR values from the exported file into the PR service." + echo -e "\texport <file.conf>: export and lock down the AUTOPR values from the PR service into a file for release." + echo -e "\timport <file.conf>: import the AUTOPR values from the exported file into the PR service." } clean_cache() @@ -61,8 +61,16 @@ do_migrate_localcount () clean_cache echo "Exporting LOCALCOUNT to AUTOINCs..." bitbake -R conf/migrate_localcount.conf -p - [ ! $? -eq 0 ] && echo "Exporting failed!" && exit 1 + [ ! $? -eq 0 ] && echo "Exporting to file $df failed!" && exit 1 + if [ -e $df ]; + then + echo "Exporting to file $df succeeded!" + else + echo "Exporting to file $df failed!" + exit 1 + fi + echo "Importing generated AUTOINC entries..." [ -e $df ] && do_import $df @@ -78,6 +86,15 @@ do_migrate_localcount () [ $# -eq 0 ] && help && exit 1 +case $2 in +*.conf|*.inc) + ;; +*) + echo ERROR: $2 must end with .conf or .inc! + exit 1 + ;; +esac + case $1 in export) do_export $2 |
