Initial commit

This commit is contained in:
Johannes Randerath 2024-05-06 18:30:40 +02:00
commit 32180cdf89

16
create_git.c Normal file
View 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);
}