3 #=======================================================================
5 # File ID: a4693388-6575-11e1-96df-8000600fe800
6 # Clone to a remote repo, create bundle, and download it via rsync(1).
7 # Temporary solution until Git gets resumable clone/fetch.
8 # License: GNU General Public License version 2 or later.
9 #=======================================================================
11 login
=sunny@sunbase.org
19 if [ -z "$url" ]; then
20 echo Syntax
: git-dl DIRNAME URL
>&2
23 dl_dir
=/home
/sunny
/src
/dl
24 bundle_dir
=/home
/sunny
/dl
/git-dl
26 remote
"mkdir -p $dl_dir $bundle_dir"
27 echo Clone
$url into
$dl_dir/$clonename.git
28 remote
"cd $dl_dir && git clone --bare $url $clonename.git"
29 echo Creating remote bundle
$bundle_dir/$clonename.bundle
30 remote
"cd $dl_dir/$clonename.git && git bundle create $bundle_dir/$clonename.bundle --all"
32 rsync
-avP $login:$bundle_dir/$clonename.bundle
$bundle_dir/