Initial commit
This commit is contained in:
commit
32180cdf89
16
create_git.c
Normal file
16
create_git.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, const char *argv[argc]) {
|
||||
if (argc < 2) {
|
||||
printf("Usage: create_git <dirname>\n");
|
||||
return 1;
|
||||
}
|
||||
char *cmd = malloc(500);
|
||||
sprintf(cmd, "ssh -t johannes@randerath.eu -i /home/johannes/.ssh/id_ed25519_git 'sudo install -vm755 -d /srv/git/%s.git && \
|
||||
sudo chown -Rv git:git /srv/git/%s.git && \
|
||||
cd /srv/git/%s.git && \
|
||||
sudo git config --system init.defaultBranch trunk'", argv[1], argv[1], argv[1]);
|
||||
return system(cmd);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user