logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: a7e83e9c4ea5caedf921cb492a6d19b738e5d0df
parent e8f545612dbd483ed2cfe26b2d905ae57fcabf28
Author: Andrius Štikonas <andrius@stikonas.eu>
Date:   Thu, 14 Jan 2021 18:57:02 +0000

Do not try to redownload files that are already downloaded.

Diffstat:

Mrootfs.sh8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/rootfs.sh b/rootfs.sh @@ -87,7 +87,9 @@ cp tcc-patched.kaem tmp/after/ # tar 1.12 url=https://ftp.gnu.org/gnu/tar/tar-1.12.tar.gz pushd ../sources -wget --continue "$url" +if [ ! -f "$(basename $url)" ]; then + wget "$url" +fi popd cp "$(basename $url .tar.gz).kaem" tmp/after tar -C tmp/after -xf "../sources/$(basename $url)" @@ -95,7 +97,9 @@ tar -C tmp/after -xf "../sources/$(basename $url)" get_file() { url=$1 pushd ../sources - wget --continue "$url" + if [ ! -f "$(basename "$url")" ]; then + wget "$url" + fi popd ext="${url##*.}" if [ "$ext" = "tar" ]; then