fix update-from-repo.sh -release:lastest: get version from raw.githubusercontent.com

This commit is contained in:
Kay Marquardt
2023-11-16 13:47:32 +01:00
committed by GitHub
parent 2175bc25fe
commit b8bd5115b4

View File

@@ -3,7 +3,7 @@
# Update webmin/usermin to the latest develop version from GitHub repo # Update webmin/usermin to the latest develop version from GitHub repo
# inspired by authentic-theme/theme-update.sh script, thanks @iliajie # inspired by authentic-theme/theme-update.sh script, thanks @iliajie
# #
VERS="1.6.9, 2020-06-18" VERS="1.6.10, 2023-11-16"
# #
COPY=" Kay Marquardt <kay@rrr.de> https://github.com/gnadelwartz" COPY=" Kay Marquardt <kay@rrr.de> https://github.com/gnadelwartz"
############################################################################# #############################################################################
@@ -285,7 +285,7 @@ fi
if [[ "$1" == *":"* ]] && [[ "$1" != *"latest"* ]]; then if [[ "$1" == *":"* ]] && [[ "$1" != *"latest"* ]]; then
RRELEASE=${1##*:} RRELEASE=${1##*:}
elif [[ "${CURL}" != "" ]] ; then elif [[ "${CURL}" != "" ]] ; then
RRELEASE=`${CURL} -s -L https://github.com/${REPO}/blob/master/version | sed -n '/id="LC1"/s/.*">\([^<]*\).*/\1/p'` RRELEASE="$(${CURL} -s -L https://raw.githubusercontent.com/${REPO}/master/version)"
else else
echo -e "${RED}Error: Command \`curl\` is not installed or not in the \`PATH\`.${NC} try with -release:1.881" echo -e "${RED}Error: Command \`curl\` is not installed or not in the \`PATH\`.${NC} try with -release:1.881"
exit 3 exit 3