init
This commit is contained in:
parent
8bfe62f3aa
commit
eb1b267003
1
nuscripts
Symbolic link
1
nuscripts
Symbolic link
@ -0,0 +1 @@
|
||||
/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/nuscripts
|
@ -25,7 +25,7 @@ export def git_configure [] {
|
||||
|
||||
|
||||
export def git_clone [ name: string url: string , --reset=false , --pull=false ] string {
|
||||
print "git clone"
|
||||
print $"git clone '($url)'"
|
||||
|
||||
git_configure
|
||||
|
||||
@ -42,7 +42,7 @@ export def git_clone [ name: string url: string , --reset=false , --pull=false ]
|
||||
git pull
|
||||
}
|
||||
} else {
|
||||
print $"git clone ($url)"
|
||||
print $"git clone execute"
|
||||
cd $"($env.BASE)/code"
|
||||
git clone --depth 1 --no-single-branch $url
|
||||
}
|
||||
@ -54,8 +54,3 @@ def sshagent_loaded [ ] bool {
|
||||
return ( (ssh-add -l | lines -s | length) > 0 )
|
||||
}
|
||||
|
||||
# if not shagent_loaded() {
|
||||
# print "could not find ssh-agent please load key in ssh-agent"
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
use git.nu
|
||||
use download.nu
|
||||
|
||||
def sshagent_loaded [ ] bool {
|
||||
return ( (ssh-add -l | lines -s | length) > 0 )
|
||||
}
|
||||
|
||||
|
||||
def url_crystal [] {
|
||||
let $ssha = sshagent_loaded
|
||||
if $ssha {
|
||||
@ -16,6 +21,21 @@ export def clone_crystal [ --reset=false , --pull=false ] string {
|
||||
return $r
|
||||
}
|
||||
|
||||
export def clone_nuscripts [ --reset=false , --pull=false ] string {
|
||||
let $ssha = sshagent_loaded
|
||||
let $dest = $"($env.BASE)/nuscripts"
|
||||
if $ssha {
|
||||
let $r = git git_clone nuscripts "git@git.ourworld.tf:despiegk/nuscripts.git"
|
||||
rm -f $dest
|
||||
ln -s $r $dest
|
||||
return $r
|
||||
} else {
|
||||
error make { msg: "load ssh-agent" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def url_mycelium [] string {
|
||||
let $os = $nu.os-info.name
|
||||
|
Loading…
Reference in New Issue
Block a user