aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-08 13:47:07 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-08 13:47:07 +0200
commit2114ca17b3507375816838bd3efdb4991dc0a758 (patch)
tree0a0af696973834536d8dc00d3144870eedaef084 /.local
parent718ed279626667034de8ae138d926625b7c4472d (diff)
Gittab is replaced by a bashtard playbook
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/gittab87
-rw-r--r--.local/etc/gittab/basedirs5
-rw-r--r--.local/etc/gittab/tabs/awesome1
-rw-r--r--.local/etc/gittab/tabs/bash1
-rw-r--r--.local/etc/gittab/tabs/weechat4
-rw-r--r--.local/etc/gittab/tabs/zsh1
6 files changed, 0 insertions, 99 deletions
diff --git a/.local/bin/gittab b/.local/bin/gittab
deleted file mode 100755
index 5ffd5f9..0000000
--- a/.local/bin/gittab
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/env perl6
-
-use v6.d;
-
-constant TABDIR = $*HOME.add('.local/etc/gittab/tabs');
-constant TABCONF = $*HOME.add('.local/etc/gittab/basedirs');
-
-#| Update managed git repositories
-multi sub MAIN (
- #| A list of targets to update.
- *@targets,
-) {
- @targets = TABDIR.dir.map(*.basename) unless @targets;
-
- for @targets -> $target {
- my $tab = find-tab($target);
-
- note "No gittab for target '$target'" unless $tab;
-
- my $basedir = get-basedir($target);
-
- mkdir($basedir) unless $basedir.d;
-
- for $tab.lines.grep(!*.starts-with("#")) {
- my ($name, $repo, $branch) = $_.words;
-
- if (!$basedir.add($name).d) {
- chdir $basedir;
- run « git clone --single-branch --branch "$branch" --depth 1 "$repo" "$name" »;
- }
-
- chdir $basedir.add($name);
- run « git checkout "$branch" »;
- run « git pull "$repo" "$branch" »;
- }
- }
-}
-
-#| List managed git repositories
-multi sub MAIN (
- Bool:D :$list!,
-) {
- my @tabs = TABDIR.dir.map(*.basename).sort;
- my $longest = @tabs.map(*.chars).sort.tail;
-
- for @tabs {
- "%-{$longest}s %s\n".printf($_, get-basedir($_));
- }
-}
-
-sub find-tab (
- Str:D $name,
-) {
- my @attempts =
- $name,
- $name ~ 'tab',
- ;
-
- for @attempts {
- my $fh = TABDIR.add($_);
-
- return $fh if $fh.f;
- }
-
- Nil;
-}
-
-sub get-basedir (
- Str:D $tab,
-) {
- state %basedirs;
-
- if (!%basedirs && TABCONF.e) {
- TABCONF
- .lines
- .grep(!*.starts-with('#'))
- .map({
- my ($tab, $basedir) = $_.words;
-
- %basedirs{$tab} = $basedir.IO;
- })
- }
-
- return $*HOME unless %basedirs{$tab}:exists;
-
- $*HOME.add(%basedirs{$tab});
-}
diff --git a/.local/etc/gittab/basedirs b/.local/etc/gittab/basedirs
deleted file mode 100644
index ca3b53d..0000000
--- a/.local/etc/gittab/basedirs
+++ /dev/null
@@ -1,5 +0,0 @@
-awesome .config/awesome
-bash .config/shell/vendor/bash
-vim .vim/bundle
-weechat .weechat/vendor
-zsh .config/shell/vendor/zsh
diff --git a/.local/etc/gittab/tabs/awesome b/.local/etc/gittab/tabs/awesome
deleted file mode 100644
index 6414bc8..0000000
--- a/.local/etc/gittab/tabs/awesome
+++ /dev/null
@@ -1 +0,0 @@
-# Local name Remote URL Branch
diff --git a/.local/etc/gittab/tabs/bash b/.local/etc/gittab/tabs/bash
deleted file mode 100644
index 0940d13..0000000
--- a/.local/etc/gittab/tabs/bash
+++ /dev/null
@@ -1 +0,0 @@
-feature-auto-completion https://github.com/scop/bash-completion.git master
diff --git a/.local/etc/gittab/tabs/weechat b/.local/etc/gittab/tabs/weechat
deleted file mode 100644
index 27b21eb..0000000
--- a/.local/etc/gittab/tabs/weechat
+++ /dev/null
@@ -1,4 +0,0 @@
-# Local name Remote URL Branch
-protocol-slack https://github.com/wee-slack/wee-slack master
-protocol-matrix https://github.com/poljar/weechat-matrix master
-protocol-signal https://github.com/thefinn93/signal-weechat master
diff --git a/.local/etc/gittab/tabs/zsh b/.local/etc/gittab/tabs/zsh
deleted file mode 100644
index 8f98e73..0000000
--- a/.local/etc/gittab/tabs/zsh
+++ /dev/null
@@ -1 +0,0 @@
-feature-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting.git master