From 5170f5c85fe0e84fe8af55c6a024c7b6e844b0f1 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 28 May 2022 19:37:22 +0100 Subject: fixed packages --- repo/test.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 repo/test.sh (limited to 'repo/test.sh') diff --git a/repo/test.sh b/repo/test.sh new file mode 100644 index 0000000..a531f72 --- /dev/null +++ b/repo/test.sh @@ -0,0 +1,46 @@ +for xipkg in $(find /var/lib/xib/repo -name '*.xipkg'); do + name=$(basename $xipkg .xipkg) + buildfile=$(realpath $(find -name "$name.xibuild" | tail -1)) + info_file=$xipkg.info + echo $name $buildfile + + . $buildfile + + pkg_ver=$PKG_VER + [ -z "$pkg_ver" ] && pkg_ver=$BRANCH + [ -z "$pkg_ver" ] && pkg_ver="latest" + + { + echo "# XiPKG info file version $XIPKG_INFO_VERSION" + echo "# automatically generated from the built packages" + echo "NAME=$name" + echo "DESCRIPTION=$DESC" + echo "PKG_FILE=$name.xipkg" + echo "CHECKSUM=$(sha512sum $xipkg | awk '{ print $1 }')" + echo "VERSION=$pkg_ver" + echo "REVISION=$(cat ${buildfile%/*}/*.xibuild | sha512sum | cut -d' ' -f1)" + echo "SOURCE=$SOURCE" + echo "DATE=$(stat -t $xipkg | cut -d' ' -f13 | xargs date -d)" + echo "DEPS=${DEPS}" + echo "MAKE_DEPS=${MAKE_DEPS}" + echo "ORIGIN=$NAME" + } > $info_file + + + +done + +#for repo in $(ls); do +# for package in $(ls $repo); do +# [ -f "/var/lib/xib/repo/$repo/$package.xipkg.info" ] && { +# [ -f "/var/lib/xib/repo/$repo/$package.xipkg" ] && { +# sed -rni 's/^REVISION=.*$//' /var/lib/xib/repo/$repo/$package.xipkg.info +# echo "$package"; +# printf "REVISION=%s" $(cat $repo/$package/*.xibuild | sha512sum | cut -d" " -f1) >> /var/lib/xib/repo/$repo/$package.xipkg.info; +# true +# } || { +# rm /var/lib/xib/repo/$repo/$package.xipkg.info +# } +# } +# done; +#done -- cgit v1.2.1