blob: a531f72c7897efdbb9ab2dcf18e0bf39e2e49d25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
|