Mercurial > uportage
comparison uportage.c @ 0:58c566277da5 default tip
initial commit
| author | Yasuri <yasuri@charliesmp.net> |
|---|---|
| date | Wed, 21 Oct 2026 14:41:16 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:58c566277da5 |
|---|---|
| 1 #include <stdio.h> | |
| 2 #include <stdlib.h> | |
| 3 #include <string.h> | |
| 4 #include <unistd.h> | |
| 5 int main(int argc, char* argv[]) { | |
| 6 if (argc > 1) { | |
| 7 char package_script[256] = ""; | |
| 8 strcat(package_script,"/var/db/uportage/"); | |
| 9 strcat(package_script,argv[1]); | |
| 10 strcat(package_script,".build"); | |
| 11 printf("Running package install script for: %s\n",argv[1]); | |
| 12 if ((chdir("/tmp") == -1) { | |
| 13 perror("chdir"); | |
| 14 } | |
| 15 system(package_script); | |
| 16 } | |
| 17 else { | |
| 18 printf("No package supplied.\n"); | |
| 19 } | |
| 20 return 0; | |
| 21 } |
