feat: add tea-init script
This commit is contained in:
parent
4ad63d7981
commit
9f919ad68e
1 changed files with 14 additions and 0 deletions
14
home.nix
14
home.nix
|
|
@ -68,6 +68,20 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
# Scripts
|
||||||
|
(writeShellScriptBin "tea-init" ''
|
||||||
|
name="''${1:-$(basename "$PWD")}"
|
||||||
|
login="''${2:-git.extremist.software}"
|
||||||
|
user=$(tea logins list -o simple | awk -v l="$login" '$2 == "https://"l {print $4}')
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
echo "error: no tea login found for $login" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
tea repo create --name "$name" --login "$login"
|
||||||
|
git remote add origin "git@''${login}:''${user}/''${name}.git"
|
||||||
|
git push -u origin "$(git branch --show-current)"
|
||||||
|
'')
|
||||||
|
|
||||||
# CLI
|
# CLI
|
||||||
bat
|
bat
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue