#!/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");

