create_repo.pl
1	#!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 my $token = $ARGV[0];
7 chomp $token;
8
9 my $url = "https://git.spwbk.site/api/v1/";
10
11 sub create_repo {
12 my $name = shift;
13
14 my $endpoint = "/user/repos";
15
16 my $curl_string = "curl -H \'Content-Type: application/json\' -X POST -d \'{\"name\": \"$name\", \"description\": \"$name\", \"private\": false}\' https://git.spwbk.site/api/v1/user/repos?token=$token";
17
18 print("$curl_string\n");
19 system($curl_string) == 0 or die "CURL ERROR with $name\n";
20
21 }
22
23
24 create_repo($ARGV[1]);