Skip to content

Commit

Permalink
Merge pull request LibreELEC#3472 from MilhouseVH/le10_pkginfo
Browse files Browse the repository at this point in the history
tools/pkginfo: simple tool to dump a package.mk
  • Loading branch information
CvH authored May 4, 2019
2 parents 9ba70c2 + d2f0502 commit 68b8b4a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tools/pkginfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)

STRIP=no
if [ "$1" = "--strip" -o "$1" = "-s" ]; then
shift
STRIP=yes
fi

. config/options "$1"

shift

echo "PROJECT=${PROJECT}, DEVICE=${DEVICE}, ARCH=${ARCH}"

for v in PKG_NAME PKG_VERSION PKG_SITE PKG_URL PKG_DIR \
PKG_NEED_UNPACK PKG_DEPENDS_UNPACK \
PKG_DEPENDS_BOOTSTRAP PKG_DEPENDS_INIT PKG_DEPENDS_HOST PKG_DEPENDS_TARGET \
PKG_IS_ADDON PKG_IS_KERNEL_PKG $@; do
if [ "${STRIP}" = "yes" ]; then
echo "${v}=\"${!v}\"" | sed "s#${ROOT}/##g"
else
echo "${v}=\"${!v}\""
fi
done

0 comments on commit 68b8b4a

Please sign in to comment.