summaryrefslogtreecommitdiff
path: root/bin/insinuate-dotfiles
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-01-05 15:28:43 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-01-05 15:28:43 -0700
commit69085300ce81ce13a65be5ab0008317ce7f6afaf (patch)
tree54ef5cdd03e378c8594d681d5fe99a447065657e /bin/insinuate-dotfiles
parentb3d8d0c4c60b760ae88f8723ef3c6b68ee05a00b (diff)
downloaddotfiles-69085300ce81ce13a65be5ab0008317ce7f6afaf.tar.gz
shallow clone in insinuate-dotfiles
Diffstat (limited to 'bin/insinuate-dotfiles')
-rwxr-xr-xbin/insinuate-dotfiles6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/insinuate-dotfiles b/bin/insinuate-dotfiles
index 4f5c1023..5f783a48 100755
--- a/bin/insinuate-dotfiles
+++ b/bin/insinuate-dotfiles
@@ -9,18 +9,16 @@
# Assumes ssh connection sharing
-# TODO Consider using a shallow clone
-
. $HOME/.shenv
. $HOME/lib/tputfs.sh
status "trying to clone dotfiles to $1 using https"
-ssh "$1" 'cd $HOME && git clone https://git.spwhitton.name/dotfiles src/dotfiles'
+ssh "$1" 'cd $HOME && git clone --depth 1 https://git.spwhitton.name/dotfiles src/dotfiles'
# https:// can fail for older ca-certificates, so try git://
if ! [ $? = 0 ]; then
status "trying to clone dotfiles to $1 using git transport"
- ssh "$1" 'cd $HOME && git clone git://spwhitton.name/dotfiles' src/dotfiles
+ ssh "$1" 'cd $HOME && git clone --depth 1 git://spwhitton.name/dotfiles' src/dotfiles
if ! [ $? = 0 ]; then
status "couldn't clone dotfiles on $1"
exit 1