mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add "Deselect i915 with dependencies"
This commit is contained in:
parent
cba3c62611
commit
25e73affee
@ -311,7 +311,7 @@ function getLogo() {
|
|||||||
rm -f "${PART3_PATH}/logo.png"
|
rm -f "${PART3_PATH}/logo.png"
|
||||||
fastest=$(_get_fastest "www.synology.com" "www.synology.cn")
|
fastest=$(_get_fastest "www.synology.com" "www.synology.cn")
|
||||||
STATUS=$(curl -skL -w "%{http_code}" "https://${fastest}/api/products/getPhoto?product=${MODEL/+/%2B}&type=img_s&sort=0" -o "${PART3_PATH}/logo.png")
|
STATUS=$(curl -skL -w "%{http_code}" "https://${fastest}/api/products/getPhoto?product=${MODEL/+/%2B}&type=img_s&sort=0" -o "${PART3_PATH}/logo.png")
|
||||||
if [ $? -ne 0 -o ${STATUS} -ne 200 -o -f "${PART3_PATH}/logo.png" ]; then
|
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 -o -f "${PART3_PATH}/logo.png" ]; then
|
||||||
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
|
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
|
||||||
magick montage "${PART3_PATH}/logo.png" -background 'none' -tile '3x3' -geometry '350x210' "${PART3_PATH}/logo.png" 2>/dev/null
|
magick montage "${PART3_PATH}/logo.png" -background 'none' -tile '3x3' -geometry '350x210' "${PART3_PATH}/logo.png" 2>/dev/null
|
||||||
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
|
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null
|
||||||
@ -350,7 +350,7 @@ function rebootTo() {
|
|||||||
# connect wlanif
|
# connect wlanif
|
||||||
# 1 netif name
|
# 1 netif name
|
||||||
function connectwlanif() {
|
function connectwlanif() {
|
||||||
[ ! -d "/sys/class/net/${1}" ] && return 1
|
[ -z "${1}" -o ! -d "/sys/class/net/${1}" ] && return 1
|
||||||
|
|
||||||
CONF=""
|
CONF=""
|
||||||
[ -z "${CONF}" -a -f "${PART1_PATH}/wpa_supplicant.conf.${1}" ] && CONF="${PART1_PATH}/wpa_supplicant.conf.${1}"
|
[ -z "${CONF}" -a -f "${PART1_PATH}/wpa_supplicant.conf.${1}" ] && CONF="${PART1_PATH}/wpa_supplicant.conf.${1}"
|
||||||
|
@ -78,7 +78,7 @@ function getdepends() {
|
|||||||
function _getdepends() {
|
function _getdepends() {
|
||||||
if [ -f "${TMP_PATH}/modules/${1}.ko" ]; then
|
if [ -f "${TMP_PATH}/modules/${1}.ko" ]; then
|
||||||
depends=($(modinfo "${TMP_PATH}/modules/${1}.ko" | grep depends: | awk -F: '{print $2}' | awk '$1=$1' | sed 's/,/ /g'))
|
depends=($(modinfo "${TMP_PATH}/modules/${1}.ko" | grep depends: | awk -F: '{print $2}' | awk '$1=$1' | sed 's/,/ /g'))
|
||||||
if [ ${#depends[*]} -gt 0 ]; then
|
if [ ${#depends[@]} -gt 0 ]; then
|
||||||
for k in ${depends[@]}; do
|
for k in ${depends[@]}; do
|
||||||
echo "${k}"
|
echo "${k}"
|
||||||
_getdepends "${k}"
|
_getdepends "${k}"
|
||||||
|
@ -189,8 +189,8 @@ if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check memory
|
# Check memory
|
||||||
RAM=$(free -m | awk '/Mem:/{print$2}')
|
RAM=$(free -m 2>/dev/null | awk '/Mem:/{print$2}')
|
||||||
if [ ${RAM} -le 3500 ]; then
|
if [ ${RAM:-0} -le 3500 ]; then
|
||||||
echo -e "\033[1;33m$(TEXT "You have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of memory.")\033[0m\n"
|
echo -e "\033[1;33m$(TEXT "You have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of memory.")\033[0m\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -421,7 +421,7 @@ function ParsePat() {
|
|||||||
SPACELEFT=$(df --block-size=1 | grep ${LOADER_DISK_PART3} | awk '{print $4}')
|
SPACELEFT=$(df --block-size=1 | grep ${LOADER_DISK_PART3} | awk '{print $4}')
|
||||||
# Discover remote file size
|
# Discover remote file size
|
||||||
FILESIZE=$(du -sb "${PAT_PATH}" | awk '{print$1}')
|
FILESIZE=$(du -sb "${PAT_PATH}" | awk '{print$1}')
|
||||||
if [ 0${FILESIZE} -ge 0${SPACELEFT} ]; then
|
if [ ${FILESIZE:-0} -ge ${SPACELEFT:-0} ]; then
|
||||||
# No disk space to copy, mv it to dl
|
# No disk space to copy, mv it to dl
|
||||||
mv -f "${PAT_PATH}" "${PART3_PATH}/dl/${MODEL}-${PRODUCTVER}.pat"
|
mv -f "${PAT_PATH}" "${PART3_PATH}/dl/${MODEL}-${PRODUCTVER}.pat"
|
||||||
else
|
else
|
||||||
@ -629,6 +629,7 @@ function moduleMenu() {
|
|||||||
s "$(TEXT "Show/Select modules")" \
|
s "$(TEXT "Show/Select modules")" \
|
||||||
l "$(TEXT "Select loaded modules")" \
|
l "$(TEXT "Select loaded modules")" \
|
||||||
u "$(TEXT "Upload a external module")" \
|
u "$(TEXT "Upload a external module")" \
|
||||||
|
i "$(TEXT "Deselect i915 with dependencies")" \
|
||||||
p "$(TEXT "Priority use of official drivers:") \Z4${ODP}\Zn" \
|
p "$(TEXT "Priority use of official drivers:") \Z4${ODP}\Zn" \
|
||||||
f "$(TEXT "Edit modules that need to be copied to DSM")" \
|
f "$(TEXT "Edit modules that need to be copied to DSM")" \
|
||||||
e "$(TEXT "Exit")" \
|
e "$(TEXT "Exit")" \
|
||||||
@ -741,6 +742,26 @@ function moduleMenu() {
|
|||||||
--msgbox "$(TEXT "Not a valid file, please try again!")" 0 0
|
--msgbox "$(TEXT "Not a valid file, please try again!")" 0 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
i)
|
||||||
|
DEPS="$(getdepends "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" i915) i915"
|
||||||
|
DELS=()
|
||||||
|
while IFS=': ' read KEY VALUE; do
|
||||||
|
[ -z "${KEY}" ] && continue
|
||||||
|
if echo "${DEPS}" | grep -wq "${KEY}"; then
|
||||||
|
DELS+=("${KEY}")
|
||||||
|
fi
|
||||||
|
done < <(readConfigMap "modules" "${USER_CONFIG_FILE}")
|
||||||
|
if [ ${#DELS[@]} -eq 0 ]; then
|
||||||
|
DIALOG --title "$(TEXT "Modules")" \
|
||||||
|
--msgbox "$(TEXT "No i915 with dependencies module to deselect.")" 0 0
|
||||||
|
else
|
||||||
|
for ID in ${DELS[@]}; do
|
||||||
|
deleteConfigKey "modules.\"${ID}\"" "${USER_CONFIG_FILE}"
|
||||||
|
done
|
||||||
|
DIALOG --title "$(TEXT "Modules")" \
|
||||||
|
--msgbox "$(printf "$(TEXT "Module %s deselected.\n")" "${DELS[@]}")" 0 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
[ "${ODP}" = "false" ] && ODP='true' || ODP='false'
|
[ "${ODP}" = "false" ] && ODP='true' || ODP='false'
|
||||||
writeConfigKey "odp" "${ODP}" "${USER_CONFIG_FILE}"
|
writeConfigKey "odp" "${ODP}" "${USER_CONFIG_FILE}"
|
||||||
@ -1006,7 +1027,7 @@ function getSynoExtractor() {
|
|||||||
|
|
||||||
STATUS=$(curl -k -w "%{http_code}" -L "${OLDPAT_URL}" -o "${OLDPAT_PATH}")
|
STATUS=$(curl -k -w "%{http_code}" -L "${OLDPAT_URL}" -o "${OLDPAT_PATH}")
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ ${RET} -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ ${RET} -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||||
rm -f "${OLDPAT_PATH}"
|
rm -f "${OLDPAT_PATH}"
|
||||||
MSG="$(printf "$(TEXT "Check internet or cache disk space.\nError: %d:%d")" "${RET}" "${STATUS}")"
|
MSG="$(printf "$(TEXT "Check internet or cache disk space.\nError: %d:%d")" "${RET}" "${STATUS}")"
|
||||||
echo -e "${MSG}" >"${MKERR_FILE}"
|
echo -e "${MSG}" >"${MKERR_FILE}"
|
||||||
@ -1134,13 +1155,13 @@ function extractDsmFiles() {
|
|||||||
echo "$(printf "$(TEXT "Downloading %s ...")" "${PAT_FILE}")"
|
echo "$(printf "$(TEXT "Downloading %s ...")" "${PAT_FILE}")"
|
||||||
# Discover remote file size
|
# Discover remote file size
|
||||||
FILESIZE=$(curl -k -sLI "${PATURL}" | grep -i Content-Length | awk '{print$2}')
|
FILESIZE=$(curl -k -sLI "${PATURL}" | grep -i Content-Length | awk '{print$2}')
|
||||||
if [ 0${FILESIZE} -ge 0${SPACELEFT} ]; then
|
if [ ${FILESIZE:-0} -ge ${SPACELEFT:-0} ]; then
|
||||||
# No disk space to download, change it to RAMDISK
|
# No disk space to download, change it to RAMDISK
|
||||||
PAT_PATH="${TMP_PATH}/${PAT_FILE}"
|
PAT_PATH="${TMP_PATH}/${PAT_FILE}"
|
||||||
fi
|
fi
|
||||||
STATUS=$(curl -k -w "%{http_code}" -L "${PATURL}" -o "${PAT_PATH}")
|
STATUS=$(curl -k -w "%{http_code}" -L "${PATURL}" -o "${PAT_PATH}")
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ ${RET} -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ ${RET} -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||||
rm -f "${PAT_PATH}"
|
rm -f "${PAT_PATH}"
|
||||||
MSG="$(printf "$(TEXT "Check internet or cache disk space.\nError: %d:%d")" "${RET}" "${STATUS}")"
|
MSG="$(printf "$(TEXT "Check internet or cache disk space.\nError: %d:%d")" "${RET}" "${STATUS}")"
|
||||||
echo -e "${MSG}" >"${MKERR_FILE}"
|
echo -e "${MSG}" >"${MKERR_FILE}"
|
||||||
@ -1208,7 +1229,7 @@ function make() {
|
|||||||
|
|
||||||
# Check disk space left
|
# Check disk space left
|
||||||
SPACELEFT=$(df --block-size=1 | grep ${LOADER_DISK_PART3} | awk '{print $4}')
|
SPACELEFT=$(df --block-size=1 | grep ${LOADER_DISK_PART3} | awk '{print $4}')
|
||||||
[ ${SPACELEFT} -le 268435456 ] && rm -rf "${PART3_PATH}/dl"
|
[ ${SPACELEFT:-0} -le 268435456 ] && rm -rf "${PART3_PATH}/dl"
|
||||||
|
|
||||||
${WORK_PATH}/zimage-patch.sh
|
${WORK_PATH}/zimage-patch.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@ -2178,7 +2199,7 @@ function downloadExts() {
|
|||||||
RET=$?
|
RET=$?
|
||||||
) 2>&1 | DIALOG --title "${T}" \
|
) 2>&1 | DIALOG --title "${T}" \
|
||||||
--progressbox "$(TEXT "Downloading ...")" 20 100
|
--progressbox "$(TEXT "Downloading ...")" 20 100
|
||||||
if [ ${RET} -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ ${RET} -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||||
if [ ! "${5}" = "0" ]; then
|
if [ ! "${5}" = "0" ]; then
|
||||||
DIALOG --title "${T}" \
|
DIALOG --title "${T}" \
|
||||||
--infobox "$(printf "$(TEXT "Error downloading new version.\nError: %d:%d")" "${RET}" "${STATUS}")" 0 0
|
--infobox "$(printf "$(TEXT "Error downloading new version.\nError: %d:%d")" "${RET}" "${STATUS}")" 0 0
|
||||||
|
@ -72,7 +72,7 @@ RD_COMPRESSED="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].rd-compres
|
|||||||
|
|
||||||
declare -A SYNOINFO
|
declare -A SYNOINFO
|
||||||
declare -A ADDONS
|
declare -A ADDONS
|
||||||
declare -A USERMODULES
|
declare -A MODULES
|
||||||
|
|
||||||
# Read synoinfo and addons from config
|
# Read synoinfo and addons from config
|
||||||
while IFS=': ' read KEY VALUE; do
|
while IFS=': ' read KEY VALUE; do
|
||||||
@ -84,7 +84,7 @@ done < <(readConfigMap "addons" "${USER_CONFIG_FILE}")
|
|||||||
|
|
||||||
# Read modules from user config
|
# Read modules from user config
|
||||||
while IFS=': ' read KEY VALUE; do
|
while IFS=': ' read KEY VALUE; do
|
||||||
[ -n "${KEY}" ] && USERMODULES["${KEY}"]="${VALUE}"
|
[ -n "${KEY}" ] && MODULES["${KEY}"]="${VALUE}"
|
||||||
done < <(readConfigMap "modules" "${USER_CONFIG_FILE}")
|
done < <(readConfigMap "modules" "${USER_CONFIG_FILE}")
|
||||||
|
|
||||||
# Patches (diff -Naru OLDFILE NEWFILE > xxx.patch)
|
# Patches (diff -Naru OLDFILE NEWFILE > xxx.patch)
|
||||||
@ -135,7 +135,7 @@ tar -zxf "${MODULES_PATH}/${PLATFORM}-$([ -n "${KPRE}" ] && echo "${KPRE}-")${KV
|
|||||||
for F in $(ls "${TMP_PATH}/modules/"*.ko 2>/dev/null); do
|
for F in $(ls "${TMP_PATH}/modules/"*.ko 2>/dev/null); do
|
||||||
M=$(basename ${F})
|
M=$(basename ${F})
|
||||||
[ "${ODP}" = "true" -a -f "${RAMDISK_PATH}/usr/lib/modules/${M}" ] && continue
|
[ "${ODP}" = "true" -a -f "${RAMDISK_PATH}/usr/lib/modules/${M}" ] && continue
|
||||||
if arrayExistItem "${M:0:-3}" "${!USERMODULES[@]}"; then
|
if arrayExistItem "${M:0:-3}" "${!MODULES[@]}"; then
|
||||||
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
|
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
|
||||||
else
|
else
|
||||||
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}"
|
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}"
|
||||||
|
@ -34,7 +34,7 @@ function getExtractor() {
|
|||||||
local PAT_URL="https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_DS3622xs%2B_42218.pat"
|
local PAT_URL="https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_DS3622xs%2B_42218.pat"
|
||||||
local PAT_FILE="DSM_DS3622xs+_42218.pat"
|
local PAT_FILE="DSM_DS3622xs+_42218.pat"
|
||||||
local STATUS=$(curl -# -w "%{http_code}" -L "${PAT_URL}" -o "${CACHE_DIR}/${PAT_FILE}")
|
local STATUS=$(curl -# -w "%{http_code}" -L "${PAT_URL}" -o "${CACHE_DIR}/${PAT_FILE}")
|
||||||
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||||
echo "[E] DSM_DS3622xs%2B_42218.pat download error!"
|
echo "[E] DSM_DS3622xs%2B_42218.pat download error!"
|
||||||
rm -rf ${CACHE_DIR}
|
rm -rf ${CACHE_DIR}
|
||||||
exit 1
|
exit 1
|
||||||
@ -83,11 +83,11 @@ function getBuildroot() {
|
|||||||
if [ "${NAME}" = "bzImage" ]; then
|
if [ "${NAME}" = "bzImage" ]; then
|
||||||
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-buildroot/releases/assets/${ID}" -o "${DEST_PATH}/bzImage-rr")
|
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-buildroot/releases/assets/${ID}" -o "${DEST_PATH}/bzImage-rr")
|
||||||
echo "TAG=${TAG}; Status=${STATUS}"
|
echo "TAG=${TAG}; Status=${STATUS}"
|
||||||
[ ${STATUS} -ne 200 ] && exit 1
|
[ ${STATUS:-0} -ne 200 ] && exit 1
|
||||||
elif [ "${NAME}" = "rootfs.cpio.xz" ]; then
|
elif [ "${NAME}" = "rootfs.cpio.xz" ]; then
|
||||||
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-buildroot/releases/assets/${ID}" -o "${DEST_PATH}/initrd-rr")
|
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-buildroot/releases/assets/${ID}" -o "${DEST_PATH}/initrd-rr")
|
||||||
echo "TAG=${TAG}; Status=${STATUS}"
|
echo "TAG=${TAG}; Status=${STATUS}"
|
||||||
[ ${STATUS} -ne 200 ] && exit 1
|
[ ${STATUS:-0} -ne 200 ] && exit 1
|
||||||
fi
|
fi
|
||||||
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ function getLKMs() {
|
|||||||
if [ "${NAME}" = "rp-lkms.zip" ]; then
|
if [ "${NAME}" = "rp-lkms.zip" ]; then
|
||||||
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-lkms/releases/assets/${ID}" -o "${CACHE_FILE}")
|
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-lkms/releases/assets/${ID}" -o "${CACHE_FILE}")
|
||||||
echo "TAG=${TAG}; Status=${STATUS}"
|
echo "TAG=${TAG}; Status=${STATUS}"
|
||||||
[ ${STATUS} -ne 200 ] && exit 1
|
[ ${STATUS:-0} -ne 200 ] && exit 1
|
||||||
fi
|
fi
|
||||||
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
||||||
[ ! -f "${CACHE_FILE}" ] && exit 1
|
[ ! -f "${CACHE_FILE}" ] && exit 1
|
||||||
@ -140,7 +140,7 @@ function getAddons() {
|
|||||||
if [ "${NAME}" = "addons.zip" ]; then
|
if [ "${NAME}" = "addons.zip" ]; then
|
||||||
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-addons/releases/assets/${ID}" -o "${CACHE_FILE}")
|
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-addons/releases/assets/${ID}" -o "${CACHE_FILE}")
|
||||||
echo "TAG=${TAG}; Status=${STATUS}"
|
echo "TAG=${TAG}; Status=${STATUS}"
|
||||||
[ ${STATUS} -ne 200 ] && exit 1
|
[ ${STATUS:-0} -ne 200 ] && exit 1
|
||||||
fi
|
fi
|
||||||
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
||||||
[ ! -f "${CACHE_FILE}" ] && exit 1
|
[ ! -f "${CACHE_FILE}" ] && exit 1
|
||||||
@ -178,7 +178,7 @@ function getModules() {
|
|||||||
if [ "${NAME}" = "modules.zip" ]; then
|
if [ "${NAME}" = "modules.zip" ]; then
|
||||||
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-modules/releases/assets/${ID}" -o "${CACHE_FILE}")
|
STATUS=$(curl -w "%{http_code}" -kLH "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://api.github.com/repos/RROrg/rr-modules/releases/assets/${ID}" -o "${CACHE_FILE}")
|
||||||
echo "TAG=${TAG}; Status=${STATUS}"
|
echo "TAG=${TAG}; Status=${STATUS}"
|
||||||
[ ${STATUS} -ne 200 ] && exit 1
|
[ ${STATUS:-0} -ne 200 ] && exit 1
|
||||||
fi
|
fi
|
||||||
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
done < <(curl -skLH "Authorization: Bearer ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases/tags/${TAG}" | jq -r '.assets[] | "\(.id) \(.name)"')
|
||||||
[ ! -f "${CACHE_FILE}" ] && exit 1
|
[ ! -f "${CACHE_FILE}" ] && exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user