mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 05:44:17 +08:00
Merge branch 'remove-sh-repo' into 'master'
Remove sh script for building the repo dir See merge request redox-os/cookbook!587
This commit is contained in:
commit
3534184e75
63
repo.sh
63
repo.sh
@ -108,65 +108,4 @@ declare -A APPSTREAM_SOURCES
|
||||
# well.
|
||||
recipes="$recipes $(target/release/pkg_deps $toml_recipes)"
|
||||
|
||||
REPO_BUILDER="./target/release/repo_builder"
|
||||
|
||||
if [ -x "$REPO_BUILDER" ] # TODO: Wait until everyone has this binary
|
||||
then
|
||||
"$REPO_BUILDER" "$REPO" $recipes
|
||||
else # TODO: Delete this soon
|
||||
|
||||
for recipe in $recipes
|
||||
do
|
||||
recipe_path=`target/release/find_recipe $recipe`
|
||||
COOKBOOK_RECIPE="$recipe_path"
|
||||
TARGET_DIR="${COOKBOOK_RECIPE}/target/${TARGET}"
|
||||
COOKBOOK_STAGE="${TARGET_DIR}/stage"
|
||||
|
||||
if [ "${COOKBOOK_STAGE}.pkgar" -nt "$REPO/$recipe.pkgar" ]
|
||||
then
|
||||
echo -e "\033[01;38;5;155mrepo - publishing $recipe\033[0m" >&2
|
||||
cp -v "${COOKBOOK_STAGE}.pkgar" "$REPO/$recipe.pkgar"
|
||||
cp -v "${COOKBOOK_STAGE}.toml" "$REPO/$recipe.toml"
|
||||
fi
|
||||
|
||||
if [ -e "${COOKBOOK_STAGE}/usr/share/metainfo" ]
|
||||
then
|
||||
APPSTREAM_SOURCES["$recipe"]="${COOKBOOK_STAGE}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${APPSTREAM}" == "1" ]
|
||||
then
|
||||
echo -e "\033[01;38;5;155mrepo - generating appstream data\033[0m" >&2
|
||||
|
||||
APPSTREAM_ROOT="$ROOT/build/${TARGET}/appstream"
|
||||
APPSTREAM_PKG="$REPO/appstream.pkgar"
|
||||
rm -rf "${APPSTREAM_ROOT}" "${APPSTREAM_PKG}"
|
||||
mkdir -p "${APPSTREAM_ROOT}"
|
||||
if [ "${#APPSTREAM_SOURCES[@]}" -ne 0 ]
|
||||
then
|
||||
appstreamcli compose \
|
||||
--origin=pkgar \
|
||||
--result-root="${APPSTREAM_ROOT}" \
|
||||
"${APPSTREAM_SOURCES[@]}"
|
||||
fi
|
||||
pkgar create \
|
||||
--archive "${APPSTREAM_PKG}" \
|
||||
--skey "${ROOT}/build/id_ed25519.toml" \
|
||||
"${APPSTREAM_ROOT}"
|
||||
fi
|
||||
|
||||
echo -e "\033[01;38;5;155mrepo - generating repo.toml\033[0m" >&2
|
||||
|
||||
echo "[packages]" > "$REPO/repo.toml"
|
||||
for toml in "$REPO/"*".toml"
|
||||
do
|
||||
package="$(basename "$toml" .toml)"
|
||||
if [ "$package" != "repo" ]
|
||||
then
|
||||
version="$(grep version "$toml" | cut -d '=' -f2-)"
|
||||
echo "$package =$version" >> "$REPO/repo.toml"
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
target/release/repo_builder "$REPO" $recipes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user