Add curl option to retry download in repackage script
This commit is contained in:
parent
c2cccf0173
commit
0d6fbe23c4
|
@ -15,7 +15,7 @@ copy_directory_from_repo () {
|
||||||
|
|
||||||
lite_copy_third_party_modules () {
|
lite_copy_third_party_modules () {
|
||||||
local build="$1"
|
local build="$1"
|
||||||
curl --insecure -L "https://github.com/rxi/lite-colors/archive/master.zip" -o "$build/rxi-lite-colors.zip"
|
curl --retry 5 --retry-delay 3 --insecure -L "https://github.com/rxi/lite-colors/archive/master.zip" -o "$build/rxi-lite-colors.zip" || exit 1
|
||||||
mkdir -p "$build/third/data/colors" "$build/third/data/plugins"
|
mkdir -p "$build/third/data/colors" "$build/third/data/plugins"
|
||||||
unzip -qq "$build/rxi-lite-colors.zip" -d "$build"
|
unzip -qq "$build/rxi-lite-colors.zip" -d "$build"
|
||||||
mv "$build/lite-colors-master/colors" "$build/third/data"
|
mv "$build/lite-colors-master/colors" "$build/third/data"
|
||||||
|
@ -36,15 +36,17 @@ while [ ! -z ${1+x} ]; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
wget="wget --retry-connrefused --waitretry=1 --read-timeout=20 --no-check-certificate"
|
||||||
|
|
||||||
workdir=".repackage"
|
workdir=".repackage"
|
||||||
rm -fr "$workdir" && mkdir "$workdir" && pushd "$workdir"
|
rm -fr "$workdir" && mkdir "$workdir" && pushd "$workdir"
|
||||||
|
|
||||||
fetch_packages_from_github () {
|
fetch_packages_from_github () {
|
||||||
assets=($(wget --no-check-certificate -q -nv -O- https://api.github.com/repos/franko/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4))
|
assets=($($wget -q -nv -O- https://api.github.com/repos/franko/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4))
|
||||||
|
|
||||||
for url in "${assets[@]}"; do
|
for url in "${assets[@]}"; do
|
||||||
echo "getting: $url"
|
echo "getting: $url"
|
||||||
wget -q --no-check-certificate "$url"
|
$wget -q "$url" || exit 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue