|
0
|
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 } |