mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Changes for OSX
This commit is contained in:
parent
c3066b4560
commit
8501e598a4
7 changed files with 16 additions and 10 deletions
scripts
|
@ -1,16 +1,19 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use IO::Socket;
|
||||
use File::Spec;
|
||||
|
||||
$socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1",
|
||||
PeerPort => 1234,
|
||||
Proto => "tcp",
|
||||
Type => SOCK_STREAM);
|
||||
|
||||
my $absolute_path = File::Spec->rel2abs($ARGV[0]);
|
||||
|
||||
# Send the length of the first argument as a byte.
|
||||
$socket->send(chr(length($ARGV[0])));
|
||||
$socket->send(chr(length($absolute_path)));
|
||||
# Send the first argument as a string.
|
||||
$socket->send($ARGV[0]);
|
||||
$socket->send($absolute_path);
|
||||
|
||||
# This call is intended to block, we're waiting for Godot to close the connection.
|
||||
my $reply;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue