slow-network-git-getter bash script for linux
Page 1 of 1
slow-network-git-getter bash script for linux
- 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
Re: slow-network-git-getter bash script for linux
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.
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.
Similar topics
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Custom Linux Bash IP Network Scanner
» Convert MP4 To MP3 Linux Bash Script
» BASH Linux Talking IP Script
» Linux Bash Dog Age Calculator Script
» Custom Linux Bash IP Network Scanner
» Convert MP4 To MP3 Linux Bash Script
» BASH Linux Talking IP Script
» Linux Bash Dog Age Calculator Script
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum