PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

slow-network-git-getter bash script for linux

Go down

slow-network-git-getter bash script for linux Empty slow-network-git-getter bash script for linux

Post by jamied_uk 19th November 2024, 20:40

Code:
#!/bin/bash
# https://jnet.forumotion.com/t2069-slow-network-git-getter-bash-script-for-linux#3201
# Created By J~Net (c) 2024
#
# ./slow-network-git-getter.sh
#
TO_GET="https://github.com/rhasspy/piper-recording-studio.git"
#
#
echo "Slow Network Git Getter Created By J~Net (c) 2024"
echo ""

# Extract the repository name from the URL
REPO_NAME=$(basename -s .git $TO_GET)

# Clone the repository with shallow depth
git clone --depth=1 $TO_GET

# Check if the clone was successful
if [ $? -eq 0 ]; then
    echo "Repository cloned successfully."
    # Navigate to the cloned repository directory
    cd $REPO_NAME || { echo "Failed to navigate to $REPO_NAME"; exit 1; }

    # Fetch the remaining history
    git fetch --unshallow

    echo "All Done!"
else
    echo "Failed to clone repository."
fi

echo ""


Obviously change to the repo you actually want to DL!


Code:
sudo apt install -y git


Code:
sudo chmod +x *.sh

Code:
./slow-network-git-getter.sh


Last edited by jamied_uk on 19th November 2024, 20:55; edited 2 times in total
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

slow-network-git-getter bash script for linux Empty Re: slow-network-git-getter bash script for linux

Post by jamied_uk 19th November 2024, 20:51

This script will fix errors like the following if you got slow wifi for example...

BEFORE:

error: RPC failed; curl 56 Recv failure: Connection reset by peer
error: 60021 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output


AFTER:

Cloning into 'piper-recording-studio'...
remote: Enumerating objects: 286, done.
remote: Counting objects: 100% (286/286), done.
remote: Compressing objects: 100% (253/253), done.
remote: Total 286 (delta 23), reused 272 (delta 21), pack-reused 0 (from 0)
Receiving objects: 100% (286/286), 4.64 MiB | 27.00 KiB/s, done.
Resolving deltas: 100% (23/23), done.
remote: Enumerating objects: 188, done.
remote: Counting objects: 100% (188/188), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 160 (delta 101), reused 98 (delta 42), pack-reused 0 (from 0)
Receiving objects: 100% (160/160), 696.79 KiB | 3.45 MiB/s, done.
Resolving deltas: 100% (101/101), completed with 19 local objects.
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum