support/scripts/pkg-stats: allow to run script outside of the top-level directory
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 5 Nov 2020 16:30:19 +0000 (17:30 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 11 Nov 2020 11:01:21 +0000 (12:01 +0100)
commitae86067a151b6596ca492d6f94ed513f4f8e18d7
tree67f54a4239b718fff8f7f6b4cec4fcba2489f4ff
parent091e2aec683f2a28b3ef5f9014455b56167dc42b
support/scripts/pkg-stats: allow to run script outside of the top-level directory

Currently, pkg-stats expects being executed from Buildroot's top-level
source directory. As we are going to extend pkg-stats to cover only
the packages available in the current configuration, it makes sense to
be able to run it from the output directory, which can be anywhere
compared to Buildroot's top-level directory.

This commit adjusts pkg-stats to this, by inferring all Buildroot
paths based on the location of the pkg-stats script itself.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/pkg-stats