From 9178683da32a76ceaac8d70271042482bc317770 Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Sat, 8 Nov 2025 03:47:37 -0600 Subject: new git scripts --- git/pull-git | 13 ------------- git/pull-git.pl | 12 ++++++++++++ git/push-git | 13 ------------- git/push-git.pl | 12 ++++++++++++ 4 files changed, 24 insertions(+), 26 deletions(-) delete mode 100755 git/pull-git create mode 100755 git/pull-git.pl delete mode 100755 git/push-git create mode 100755 git/push-git.pl (limited to 'git') diff --git a/git/pull-git b/git/pull-git deleted file mode 100755 index a47e777..0000000 --- a/git/pull-git +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env fish - -set branch "master" -if test (count $argv) -eq 1 - set branch $argv[1] -end -echo "pull from $branch" - -git pull b7j0c $branch -git pull github $branch -git pull sr.ht $branch -git pull codeberg $branch - diff --git a/git/pull-git.pl b/git/pull-git.pl new file mode 100755 index 0000000..162537a --- /dev/null +++ b/git/pull-git.pl @@ -0,0 +1,12 @@ +#!/usr/bin/env perl +use v5.42; + +my $branch = `git branch --show-current`; +$branch =~ s/\s+$//g; +say 'pulling from ' . $branch; +for my $remote (qw( b7j0c github sr.ht codeberg )) { + my $cmd = "git pull $remote $branch"; + say $cmd; + system($cmd); +} +__END__ diff --git a/git/push-git b/git/push-git deleted file mode 100755 index 30ce865..0000000 --- a/git/push-git +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env fish - -set branch "master" -if test (count $argv) -eq 1 - set branch $argv[1] -end -echo "push to $branch" - -git push b7j0c $branch -git push github $branch -git push sr.ht $branch -git push codeberg $branch - diff --git a/git/push-git.pl b/git/push-git.pl new file mode 100755 index 0000000..15cfc75 --- /dev/null +++ b/git/push-git.pl @@ -0,0 +1,12 @@ +#!/usr/bin/env perl +use v5.42; + +my $branch = `git branch --show-current`; +$branch =~ s/\s+$//g; +say 'pushing to ' . $branch; +for my $remote (qw( b7j0c github sr.ht codeberg )) { + my $cmd = "git push $remote $branch"; + say $cmd; + system($cmd); +} +__END__ -- cgit v1.2.3