sane-clone: simplify to not use jq
This commit is contained in:
parent
a94c460a95
commit
ae5dee394c
|
@ -69,7 +69,7 @@ let
|
||||||
clone = static-nix-shell.mkBash {
|
clone = static-nix-shell.mkBash {
|
||||||
pname = "sane-clone";
|
pname = "sane-clone";
|
||||||
src = ./src;
|
src = ./src;
|
||||||
pkgs = [ "jq" "nix" ];
|
pkgs = [ "nix" ];
|
||||||
};
|
};
|
||||||
deadlines = static-nix-shell.mkBash {
|
deadlines = static-nix-shell.mkBash {
|
||||||
pname = "sane-deadlines";
|
pname = "sane-deadlines";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p jq -p nix
|
#!nix-shell -i bash -p nix
|
||||||
|
|
||||||
# use like `eval $(sane-clone tuba)` to clone and cd into a tuba checkout
|
# use like `eval $(sane-clone tuba)` to clone and cd into a tuba checkout
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ basedir=/home/colin/ref/repos
|
||||||
|
|
||||||
# fetchFromGitHub: provides src.{gitRepoUrl,owner,repo}
|
# fetchFromGitHub: provides src.{gitRepoUrl,owner,repo}
|
||||||
# fetchFromGitLab: provides src.gitRepoUrl only
|
# fetchFromGitLab: provides src.gitRepoUrl only
|
||||||
repourl="$(nix eval nixpkgs#$srcattr.gitRepoUrl | jq --raw-output)"
|
repourl="$(nix eval --raw nixpkgs#$srcattr.gitRepoUrl)"
|
||||||
repoowner="$(nix eval nixpkgs#$srcattr.owner | jq --raw-output)"
|
repoowner="$(nix eval --raw nixpkgs#$srcattr.owner)"
|
||||||
reponame="$(nix eval nixpkgs#$srcattr.repo | jq --raw-output)"
|
reponame="$(nix eval --raw nixpkgs#$srcattr.repo)"
|
||||||
|
|
||||||
ownerdir="$basedir/$repoowner"
|
ownerdir="$basedir/$repoowner"
|
||||||
clonedir="$ownerdir/$reponame"
|
clonedir="$ownerdir/$reponame"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user