mirror of https://github.com/aldy505/dotfiles.git
mom look, I made a degit clone using julia!
This commit is contained in:
parent
89c546027b
commit
f8218dc843
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env julia
|
||||||
|
|
||||||
|
repo = ""
|
||||||
|
directory = ""
|
||||||
|
|
||||||
|
if length(ARGS) >= 1 && ARGS[1] != ""
|
||||||
|
if startswith(ARGS[1], "https://") || startswith(ARGS[1], "git@")
|
||||||
|
repo = ARGS[1]
|
||||||
|
elseif startswith(ARGS[1], "github:")
|
||||||
|
repo = "git@github.com:" * chop(ARGS[1], head = 7, tail = 0)
|
||||||
|
elseif startswith(ARGS[1], "gitlab:")
|
||||||
|
repo = "git@gitlab.com:" * chop(ARGS[1], head = 7, tail = 0)
|
||||||
|
elseif startswith(ARGS[1], "bitbucket:")
|
||||||
|
repo = "git@bitbucket.org:" * chop(ARGS[1], head = 10, tail = 0)
|
||||||
|
else
|
||||||
|
repo = "git@github.com:" * ARGS[1]
|
||||||
|
end
|
||||||
|
else
|
||||||
|
println("Repository can't be empty!!!")
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if length(ARGS) > 1 && ARGS[2] != ""
|
||||||
|
directory = ARGS[2]
|
||||||
|
else
|
||||||
|
directory = split(repo, "/")[2]
|
||||||
|
end
|
||||||
|
|
||||||
|
run(`git clone --depth=1 $repo $directory`)
|
||||||
|
run(`rm -rf $directory/.git`)
|
|
@ -21,7 +21,7 @@ color-link identifier.macro ""
|
||||||
color-link identifier.class "#c792ea" # ok
|
color-link identifier.class "#c792ea" # ok
|
||||||
color-link identifier.var "#c5e478" # ok
|
color-link identifier.var "#c5e478" # ok
|
||||||
color-link indent-char "#515151"
|
color-link indent-char "#515151"
|
||||||
color-link current-line-number "#4b6479,#000000" # ok
|
color-link current-line-number "#4b6479,#1d3b53" # ok
|
||||||
color-link line-number "#868686,#1B1B1B"
|
color-link line-number "#868686,#1B1B1B"
|
||||||
color-link preproc "#E0C589"
|
color-link preproc "#E0C589"
|
||||||
color-link preproc.shebang "#ef1f23" # ok
|
color-link preproc.shebang "#ef1f23" # ok
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
"*.go": {
|
"*.go": {
|
||||||
"tabstospaces": false
|
"tabstospaces": false
|
||||||
},
|
},
|
||||||
|
"autosave": 60,
|
||||||
|
"clipboard": "terminal",
|
||||||
"colorscheme": "night-owl",
|
"colorscheme": "night-owl",
|
||||||
"tabsize": 2,
|
"tabsize": 2,
|
||||||
"tabtospaces": true
|
"tabtospaces": true
|
||||||
|
|
Loading…
Reference in New Issue