Files
2026-08-10 16:12:09 +02:00

21 lines
408 B
Perl
Executable File

#!/usr/bin/perl
use Getopt::Std;getopts('x');
use Sys::Hostname qw(hostname);use Socket;
my($ip) = inet_ntoa( (gethostbyname(hostname()))[4] );
my($user)=getpwuid( $< );
if ($opt_x) {
$comment="[$ip,$user] " . join(' ',@ARGV);
} else {
$comment=join(' ',@ARGV);
}
$comment='-' if ($comment=~/^\s*$/);
$comment=~s/\s*$//;
system("git add -v .");
system("git commit -m '$comment'");
system("git push");