1
0
mirror of https://github.com/kenzok8/small-package synced 2025-11-18 01:01:34 +08:00

update-12.16

This commit is contained in:
github-actions[bot]
2021-12-16 20:32:17 +08:00
parent 774731060b
commit f907bde645
3 changed files with 21 additions and 15 deletions

View File

@@ -35,6 +35,10 @@ opkg_wrap() {
OPKG_CONF_DIR=${OPKG_CONF_DIR} opkg -f ${IS_ROOT}/etc/opkg.conf "$@"
}
fcurl() {
curl --fail --show-error "$@"
}
update() {
if [ -z "${ARCH}" ]; then
echo "Get architecture failed" >&2
@@ -43,10 +47,12 @@ update() {
return 1
fi
curl -o ${OPKG_CONF_DIR}/meta.conf "${FEEDS_SERVER}/all/meta.conf" && \
curl -o ${OPKG_CONF_DIR}/all.conf "${FEEDS_SERVER}/all/isfeeds.conf" && \
curl -o ${OPKG_CONF_DIR}/arch.conf "${FEEDS_SERVER}/${ARCH}/isfeeds.conf" && \
opkg -f ${IS_ROOT}/etc/opkg_o.conf --offline-root ${IS_ROOT} update
fcurl -o ${OPKG_CONF_DIR}/meta.conf "${FEEDS_SERVER}/all/meta.conf" && \
fcurl -o ${OPKG_CONF_DIR}/all.conf "${FEEDS_SERVER}/all/isfeeds.conf" && \
fcurl -o ${OPKG_CONF_DIR}/arch.conf "${FEEDS_SERVER}/${ARCH}/isfeeds.conf" || \
return 1
opkg -f ${IS_ROOT}/etc/opkg_o.conf --offline-root ${IS_ROOT} update
return 0
}